Hello,Dear expert
I write commands as follow:
xtset stock year
gen y=ln_innovK
gen x=DifG
gen w=cgbl
program abzj,rclass
tempname a b
xtdpdsys w x age tq size debt year1-year12 , endogenous(x,lag(0,1)) twostep
scalar `a'=_b[x]
xtdpdsys y w x age tq size debt year1-year12, endogenous(x,lag(0,1)) twostep
scalar `b'=_b[w]
return scalar ab=`b'*`a'
end
set seed 11111
bootstrap ab=r(ab) ,reps(1000) nodrop :abzj
------------------------------------------------------------
Then I got this error:
"insufficient observations to compute bootstrap standard errors
no results will be saved"
but if I change the "xtdpdsys"to "xtreg" as follows , It will be ok.
program abzj,rclass
tempname a b
xtregw x age tq size debt year1-year12 , fe
scalar `a'=_b[x]
xtreg y w x age tq size debt year1-year12, fe
scalar `b'=_b[w]
return scalar ab=`b'*`a'
end
Then I change the regression command with xtscc ,it will also have the same error.
my data as follows:
xtdes
stock: 4, 16, ..., 603366 n = 1098
year: 2003, 2004, ..., 2014 T = 12
Delta(year) = 1 unit
Span(year) = 12 periods
(stock*year uniquely identifies each observation)
Distribution of T_i: min 5% 25% 50% 75% 95% max
1 1 4 6 11 12 12
Freq. Percent Cum. | Pattern
---------------------------+--------------
245 22.31 22.31 | 111111111111
104 9.47 31.79 | .......11111
96 8.74 40.53 | ........1111
41 3.73 44.26 | .........111
34 3.10 47.36 | ......111111
33 3.01 50.36 | ....11111111
30 2.73 53.10 | .1..........
29 2.64 55.74 | ...111111111
28 2.55 58.29 | .11111111111
458 41.71 100.00 | (other patterns)
---------------------------+--------------
1098 100.00 | XXXXXXXXXXXX
I also find the same problem using other panel data.
So does it mean that command "xtreg“ only can be used in this suitiation?
I am willing to provide the data through email to you to test.
My email is [email protected]
Pleaes contact with me ,if you need the data to test it
Thank you for your help.
I write commands as follow:
xtset stock year
gen y=ln_innovK
gen x=DifG
gen w=cgbl
program abzj,rclass
tempname a b
xtdpdsys w x age tq size debt year1-year12 , endogenous(x,lag(0,1)) twostep
scalar `a'=_b[x]
xtdpdsys y w x age tq size debt year1-year12, endogenous(x,lag(0,1)) twostep
scalar `b'=_b[w]
return scalar ab=`b'*`a'
end
set seed 11111
bootstrap ab=r(ab) ,reps(1000) nodrop :abzj
------------------------------------------------------------
Then I got this error:
"insufficient observations to compute bootstrap standard errors
no results will be saved"
but if I change the "xtdpdsys"to "xtreg" as follows , It will be ok.
program abzj,rclass
tempname a b
xtregw x age tq size debt year1-year12 , fe
scalar `a'=_b[x]
xtreg y w x age tq size debt year1-year12, fe
scalar `b'=_b[w]
return scalar ab=`b'*`a'
end
Then I change the regression command with xtscc ,it will also have the same error.
my data as follows:
xtdes
stock: 4, 16, ..., 603366 n = 1098
year: 2003, 2004, ..., 2014 T = 12
Delta(year) = 1 unit
Span(year) = 12 periods
(stock*year uniquely identifies each observation)
Distribution of T_i: min 5% 25% 50% 75% 95% max
1 1 4 6 11 12 12
Freq. Percent Cum. | Pattern
---------------------------+--------------
245 22.31 22.31 | 111111111111
104 9.47 31.79 | .......11111
96 8.74 40.53 | ........1111
41 3.73 44.26 | .........111
34 3.10 47.36 | ......111111
33 3.01 50.36 | ....11111111
30 2.73 53.10 | .1..........
29 2.64 55.74 | ...111111111
28 2.55 58.29 | .11111111111
458 41.71 100.00 | (other patterns)
---------------------------+--------------
1098 100.00 | XXXXXXXXXXXX
I also find the same problem using other panel data.
So does it mean that command "xtreg“ only can be used in this suitiation?
I am willing to provide the data through email to you to test.
My email is [email protected]
Pleaes contact with me ,if you need the data to test it
Thank you for your help.
Comment