⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xt.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 01apr2005}{...}
{cmd:help xt}, {cmd:help iis}, {cmd:help tis} {right:dialogs:  {bf:{dialog iis}}  {bf:{dialog tsset}}}
{hline}

{title:Title}

{p2colset 5 16 18 2}{...}
{p2col :{hi:[XT] xt} {hline 2}}Introduction to xt commands{p_end}
{p2colreset}{...}


{title:Syntax}

{phang2}{cmd:xt}{it:cmd} {it:...} [{cmd:,} {opt i(varname_i)}
{opt t(varname_t)} {it:...}]

{phang2}{cmd:iis} [{it:varname_i}] [{cmd:, clear}]

{phang2}{cmd:tis} [{it:varname_i}] [{cmd:, clear}]


{title:Description}

{pstd}
The xt series of commands provide tools for analyzing cross-sectional
time-series datasets:

{p 8 26 2}{helpb xtdes} {space 4} Describe pattern of xt data{p_end}
{p 8 26 2}{helpb xtsum} {space 4} Summarize xt data{p_end}
{p 8 26 2}{helpb xttab} {space 4} Tabulate xt data{p_end}
{p 8 26 2}{helpb xtdata} {space 3} Faster specification searches with xt data{p_end}

{p 8 26 2}{helpb xtline} {space 3} Line plots with xt data{p_end}

{p 8 26 2}{helpb xtreg} {space 4} Fixed-, between- and random-effects, and population-averaged linear models{p_end}
{p 8 26 2}{helpb xtregar} {space 2} Fixed- and random-effects linear models with an AR(1) disturbance{p_end}
{p 8 26 2}{helpb xtgls} {space 4} Panel-data models using GLS{p_end}
{p 8 26 2}{helpb xtpcse} {space 3} OLS or Prais-Winsten models with panel-corrected standard errors{p_end}
{p 8 26 2}{helpb xtrc} {space 5} Random coefficients models{p_end}
{p 8 26 2}{helpb xtivreg} {space 2} Instrumental variables and two-stage least squares for panel-data models{p_end}
{p 8 26 2}{helpb xtabond} {space 2} Arellano-Bond linear, dynamic panel data estimator{p_end}

{p 8 26 2}{helpb xttobit} {space 2} Random-effects tobit models{p_end}
{p 8 26 2}{helpb xtintreg} {space 1} Random-effects interval data regression models{p_end}

{p 8 26 2}{helpb xtlogit} {space 2} Fixed-effects, random-effects, & population-averaged logit models{p_end}
{p 8 26 2}{helpb xtprobit} {space 1} Random-effects and population-averaged probit models{p_end}
{p 8 26 2}{helpb xtcloglog}{space 2}Random-effects and population-averaged cloglog models{p_end}

{p 8 26 2}{helpb xtpoisson}{space 2}Fixed-effects, random-effects, & population-averaged Poisson models{p_end}
{p 8 26 2}{helpb xtnbreg} {space 2} Fixed-effects, random-effects, & population-averaged negative binomial models{p_end}

{p 8 26 2}{helpb xtgee} {space 4} Population-averaged panel-data models using GEE{p_end}

{pstd}
Cross-sectional time-series (longitudinal) datasets are of the form
{hi:x}_{it:it}, where {hi:x}_{it:it} is a vector of observations for unti
{it:i} and time {it:t}.  The particular commands (such as {cmd:xtdes},
{cmd:xtsum}, {cmd:xtreg}, etc.) are documented in their own help file entries.
This entry deals with concepts common across commands.

{pstd}
{cmd:iis} is related to the {opt i()} option on the other xt commands.
Command {cmd:iis} or option {opt i()} sets the name of the variable
corresponding to the unit index i.

{pstd}
{cmd:tis} is similarly related to the {opt t()} option.  Command {cmd:tis}
or option {opt t()} sets the name of the variable corresponding to the time
index t.  {cmd:tis} without an argument displays the current name of the time
variable.

{pstd}
Some xt commands use time-series operators in their internal calculations,
and thus require that your data be {cmd:tsset}; see {helpb tsset}.  For
instance, since {cmd:xtabond} uses time-series operators in its internal
calculations, you must {cmd:tsset} your data before using it.  The particular
help file will indicate if {cmd:tsset} is required before using the for the
command.  For these commands, {cmd:iis} {cmd:tis} are neither sufficient nor
recommended.

{pstd}
Note that specifying {cmd:iis} or {cmd:tis} will clear any previous
{cmd:tsset} settings.  Also, specifying {cmd:tsset} will override any settings
specified by {cmd:iss} or {cmd:tis}.

{title:Options}

{phang}
{opt i(varname_i)} specifies the variable name corresponding to index i in
{bf:x}{it:it}.  This must be a single, numeric variable, although whether it
takes on the values 1, 2, 3 or 1, 7, 9, or even -2, 2^1/2, pi, is irrelevant.
(If the identifying variable is a string, use {cmd:egen}'s {opt group()}
function to make a numeric variable from it; see {helpb egen}.)

{pmore}
For instance, if the cross-sectional time-series data are of persons in the 
years 1991-1994, each observation is a person in one of the years; there are
four observations per person (assuming no missing data).  {it:varname_i}
is the name of the variable that uniquely identifies the persons.

{pmore}
You can specify the {opt i()} option the first time you estimate, or you can
use the {opt iis} command to set the {opt i()} beforehand.  Note that it is
not necessary to specify {opt i()} if the data have been previously
{opt tsset} or if {opt iis} has been previously specified -- in these cases,
the group variable is taken from the previous setting.

{phang}
{opt t(varname_t)} specifies the variable name corresponding to index t in
{bf:x}{it:it}.  This must be a single, numeric variable, although whether it
takes on the values 1, 2, 3 or 1, 7, 9, or even -2, 2^1/2, pi, is irrelevant.

{pmore}
For instance, if the cross-sectional time-series data are of persons in the 
years 1991-1994, each observation is a person in one of the years; there are
four observations per person (assuming no missing data).  {it:varname_t}
is the name of the variable that uniquely identifies the persons.

{pmore}
You can specify the {opt t()} option the first time you estimate, or you can
use the {opt tis} command to set the {opt t()} beforehand.  Note that it is
not necessary to specify {opt t()} if the data have been previously
{opt tsset} or if {opt tis} has been previously specified -- in these cases,
the group variable is taken from the previous setting.

{phang}
{opt clear} removes the definition of {opt i()} or {opt t()}.  For instance,
typing {cmd:tis, clear} makes Stata forget the identity of the {opt t()}
variable.


{title:Remarks}

{pstd}
Once {opt i()} and {opt t()} have been specified, either by option or by
the {cmd:iis} and {cmd:tis} commands, they need not be specified again except
to change the variable's identity.

{pstd}
{opt iis} and {opt tis}, without arguments, list the current name of the
index variable.


{title:Example}

{pstd}
An xt dataset:

	 pid  yr_visit  fev  age  sex   height  smokes
	{hline 46}
	1071    1991   1.21   25   1      69       0
	1071    1992   1.52   26   1      69       0
	1071    1993   1.32   28   1      68       0
	1072    1991   1.33   18   1      71       1
	1072    1992   1.18   20   1      71       1
	1072    1993   1.19   21   1      71       0

{pstd}
The other xt commands need to know the identities of the variables
identifying patient and time.  You could type

	{cmd:. iis pid}
	{cmd:. tis yr_visit}


{title:Also see}

{psee}
Manual:  {bf:[XT] xt}

{psee}
Online:  {helpb xtabond}, {helpb xtcloglog}, {helpb xtdata}, {helpb xtdes},
{helpb xtfrontier}, {helpb xtgee}, {helpb xtgls}, {helpb xthtaylor}, 
{helpb xtintreg}, {helpb xtivreg}, {helpb xtlogit}, {helpb xtnbreg}, 
{helpb xtpcse}, {helpb xtpoisson}, {helpb xtprobit}, {helpb xtrc}, 
{helpb xtreg}, {helpb xtregar}, {helpb xtsum}, {helpb xttab}, {helpb xttobit}; 
{helpb tsset}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -