为什么stata定义stata滞后项

stata动态面板如何指定滞后阶数作为IV_百度知道
stata动态面板如何指定滞后阶数作为IV
我有更好的答案
步1:数据作如下排列(excel): province year gdp fdi 步2:全选后,打开stata中的data editor窗口,粘贴; 步3:在命令框中输入 tis year iis province 就可以了 下来就可以用xtreg方法了
采纳率:85%
来自团队:
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。stata&滞后项
& & [U] 11.4.4 Time-series
Description
& & Time-series varlists are
a variation on varlists of existing variables.
&When a command allows a time-series varlist, you
may include time-series
& & operators.
&For instance, L.gnp refers to the lagged value of
variable gnp. &The time-series operators are
& Operator &Meaning
---------------------------------------------------------
& &lag (x_t-1)
& 2-period lag (x_t-2)
& &lead (x_t+1)
& 2-period lead (x_t+2)
& &difference (x_t - x_t-1)
& difference of difference (x_t - 2x_t-1 +
& &"seasonal" difference (x_t -
& lag-2 (seasonal) difference (x_t - x_t-2)
---------------------------------------------------------
&Time-series operators may be repeated and
combined. &L3.gnp refers to the third lag of
variable gnp, as do LLL.gnp, LL2.gnp, and L2L.gnp.
&The lead operator F. is the complement of the lag
operator L., so FL.gnp is just gnp.
&Note that D1.gnp equals S1.gnp, but D2.gnp does
not equal S2.gnp because
&D2.gnp = (gnp_t - gnp_t-1) - (gnp_t-1 -
&= gnp_t - 2*gnp_t-1 + gnp_t-2
&S2.gnp = (gnp_t - gnp_t-2)
&Operators may be typed in lowercase or
uppercase.
&Operators can b Stata will
convert the expression to its canonical form. &For
example, Stata will convert ld2ls12d.gnp to
& &L2D3S12.gnp.
&In addition to operator#, Stata understands
operator(numlist) to mean a set of operated variables.
&For example, specifying
&L(1/3).gnp
& &in a varlist is the same as
&L.gnp L2.gnp L3.gnp
&In operator#, making # zero returns the variable
itself. &Thus, instead of typing
&regress y x L(1/3).x
& &you can save a few keystrokes
&regress y L(0/3).x
&Before using time-series operators, you must
declare the time variable using tsset.
&. list l.gnp
&time variable not set
&. tsset time
&(output omitted)
&. list l.gnp
&(output omitted)
&Variable names can be abbreviated subject to the
usual Stata conventions. &If the only variable in
your dataset that begins with gn is gnp, then
& &you can type L.gn instead of
&The time-series operators respect the time
variable. &L2.gnp refers to gnp_t-2 regardless of
missing observations in the dataset. &Notice in
& &following dataset that the
observation for 1992 is missing:
+------------------------+
& & | year &
& &gnp & L2.gnp
|------------------------|
&1. | 1989 & 5452.8
&2. | 1990 & 5764.9
&3. | 1991 & 5932.4
& 5452.8 |
&4. | 1993 & 6560.0
& 5932.4 | &- Note, filled in correctly
&5. | 1994 & 6922.4
&6. | 1995 & 7237.5
& 6560.0 |
+------------------------+
&Time-series operators work with panel data as
well as pure time-series data. &The only
difference is in how you tsset your data.
&. webuse grunfeld
&. tsset company time
& & 12. The time-series
operators L. and F. may be combined with factor variables.
&. sysuse census
&. generate t = _n
&. tsset t
&. regress death medage iL.region [aw=pop]
& &You could have specified
Li.region instead of iL. the results would be the
& & . webuse gxmpl1
& & . list cpi L.cpi L2.cpi
& & . list cpi
L(1/3).cpi
& & . list cpi L2.cpi
& & . list cpi F.cpi F2.cpi
& & . list cpi F2.cpi
& & . generate cpi_diff =
cpi[_n] - cpi[_n-1]
& & . list cpi cpi_diff
& & . list cpi D.cpi S.cpi
D2.cpi S2.cpi
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。面板数据stata单位根检验滞后期怎么选_百度知道
面板数据stata单位根检验滞后期怎么选
我有更好的答案
stata统计分析,找我吧
为您推荐:
其他类似问题
单位根检验的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。选取自变量的滞后项作为工具变量stata命令怎么写_百度知道
选取自变量的滞后项作为工具变量stata命令怎么写
我有更好的答案
two vce(gmm),可以做sargan和AR检验,按照STATA-HELP中的例子,使用命令xtdpdsys ls l(0/1); 然后.tfp.lntrade l(0/1).lnfdi l(0/1)我在使用xtdpdsys做动态面板的系统GMM估计时, 当使用的命令为xtdpdsys ls lntrade lnfdi tfp lnagdp lnkty
采纳率:92%
来自团队:
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 stata 滞后一期回归 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信