📄 xtdata.hlp
字号:
{smcl}
{* 29mar2005}{...}
{cmd:help xtdata}{right:dialog: {bf:{dialog xtdata}}}
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[XT] xtdata} {hline 2}}Faster specification searches with xt data{p_end}
{title:Syntax}
{p 8 15 2}
{cmd:xtdata} [{varlist}] {ifin}
[{cmd:,} {it:options}]
{synoptset 15 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Main}
{synopt :{opth "i(varname:varname_i)"}}use {it:varname_i} as the panel ID variable{p_end}
{synopt :{opt re}}convert data to a form suitable for random-effects estimation{p_end}
{synopt :{opt r:atio(#)}}ratio of random effect to pure residual (standard deviations){p_end}
{synopt :{opt be}}convert data to a form suitable for between estimation{p_end}
{synopt :{opt fe}}convert data to a form suitable for fixed-effects (within) estimation{p_end}
{synopt :{opt nodouble}}keep original variable type; default is to recast type as {opt double}{p_end}
{synopt :{opt clear}}overwrite current data in memory{p_end}
{synoptline}
{p2colreset}{...}
{title:Description}
{pstd}
{cmd:xtdata} produces a transformed dataset of the variables specified in
{varlist} or of all the variables in the data. Once the data are transformed,
Stata's {helpb regress} command may be used to perform specification searches
more quickly than {cmd:xtreg}; see {helpb xtreg}. Using {cmd:xtdata, re} also
creates a variable named {opt constant}. When using {cmd:regress} after
{cmd:xtadata, re}, specify {opt noconstant} and include {cmd:constant} in the
regression. After {cmd:xtdata, be} and {cmd:xtdata, fe}, you need not include
constant or specify {cmd:regress}'s {opt noconstant} option.
{title:Options}
{dlgtab:Main}
{phang}
{opth "i(varname:varname_i)"} specifies the variable name corresponding
to {it:i} in {bf:x}{it:it}; see {helpb xt}.
{phang}
{opt re} specifies that the data are to be converted into a form suitable for
random-effects estimation. {opt re} is the default if {opt be}, {opt fe}, or
{opt re} is not specified. {opt ratio()} must also be specified.
{phang}
{opt ratio(#)} (use with {cmd:xtdata, re} only) specifies the ratio
sigma_u/sigma_e, which is the ratio of the random effect to the pure residual.
Note that this is the ratio in standard deviations, not the variances.
{phang}
{opt be} specifies that the data are to be converted into a form suitable for
between estimation.
{phang}
{opt fe} specifies that the data are to be converted into a form suitable for
fixed-effects (within) estimation.
{phang}
{opt nodouble} specifies that transformed variables keep their original types,
if possible. The default is to recast variables to {help double}.
{pmore}
Remember that {cmd:xtdata} transforms variables to be differences from
group means, pseudodifferences from group means, or group means. Specifying
{opt nodouble} will decrease the size of the resulting dataset, but may
introduce round-off errors in these calculations.
{phang}
{opt clear} specifies that the data may be converted even though the
dataset has changed since it was last saved on disk.
{title:Examples}
{phang}{cmd:. use nlswork, clear}{p_end}
{phang}{cmd:. xtdata lnw grade age* ttl_exp* tenure*, be}{p_end}
{phang}{cmd:. regress ln_w grade age* ttl_exp* tenure*}
{phang}{cmd:. use nlswork, clear}{p_end}
{phang}{cmd:. xtdata lnw grade age* ttl_exp* tenure*, fe}{p_end}
{phang}{cmd:. regress ln_w grade age* ttl_exp* tenure*}
{phang}{cmd:. use nlswork, clear}{p_end}
{phang}{cmd:. xtdata lnw grade age* ttl_exp* tenure*, re ratio(.95)}{p_end}
{phang}{cmd:. regress ln_w grade age* ttl_exp* tenure* constant, nocons}
{title:Warnings}
{phang}1. {cmd:xtdata} is intended for use during the specification
search phase of analysis. Final results should be estimated with
{cmd:xtreg} on unconverted data.
{phang}2. Using {cmd:regress} after {cmd:xtdata, fe}, produces
standard errors that are too small, but only slightly.
{phang}3. Interpret significance tests and confidence intervals loosely.
After {cmd:xtdata, fe} and {cmd:re}, an incorrect (but close to correct)
distribution is being assumed.
{phang}4. You should ignore the summary statistics reported at the top of
{cmd:regress}'s output.
{phang}5. After converting the data, you may form linear, but not
nonlinear combinations of regressors.
{title:Also see}
{psee}
Manual: {bf:[XT] xtdata}
{psee}
Online: {help xt}, {helpb xtreg}, {helpb xtregar}; {helpb regress}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -