Hi all,
I am new on this forum, and have searched through previous post to see if my question had been addressed earlier on, but I found none at least for now.
Can anyone please help with below? A bit long:
1). I need to estimate bootstrapped std. errors for the estimated ATT (Average treatment effect on the treated), ATU (Ave. treatment effect on the non-treated), etc.
I ran these post-estimation commands after movestay
. mspredict yc11, yc1_1 /*(predicted outcome of adopters should they have adopted...)*/
. mspredict yc00, yc2_1 /*(predicted outcome of non-adopters if they had not adopted or participated....)*/
.
. mspredict yc10, yc1_2 /*(predicted outcome of non-adopters had they adopted or participated......)*/
.
. mspredict yc01, yc2_2 /*(predicted outcome of adopters had they not adopted or participated.... */
Here are example outputs below:
mean yc11 = x1
mean yc01 = x2
mean yc10 = x3
mean yc00 = x4
. scalar myATT = y11-y01 = ##, say 4
. scalar myATU = y10-y00 = ##, say 2,5
. scalar myBH1 = y11-y10 = ##, say 1,5
. scalar myBH0 = y01-y00 = ##, say 1.9
. scalar myTH = myATT - myATU = ##, say 0.8
replace yc11=exp(yc11)
(172 real changes made)
. replace yc01=exp(yc01)
(636 real changes made)
. replace yc10=exp(yc10)
(636 real changes made)
. replace yc00=exp(yc00)
(172 real changes made)
I manually obtained the values above. Hence I need their standard errors for the difference.
I then hit put excel to transfer to excel so I could get the calculated scalers with appropriate std. errors:
2). Hence, my second question is:
How to effectively transfer these scalers from estimated commands in movestay to excel using putexcel? I tried the putexcel command below in Stata 14, but it didn't get the saved data into excel after my initial scalers directly from movestay. I wanted to have them all in excel for efficient formatting.
Here is the code I ran for putexcel:
. putexcel set EstimateLogYield,modify
.
. putexcel A1=("myATT") B1=("myATU") C1=("myBH1") D1=("myBH0") E1=("myTH") F1=("y11") G1=("y01") H1=("y10") I1=("y00")
file EstimateLogYield.xlsx saved
.
. putexcel A2=(scalar(myATT))
file EstimateLogYield.xlsx saved
.
. putexcel B2=(scalar(myATU))
file EstimateLogYield.xlsx saved
etc... .......
. ereturn list
scalars:
e(df_r) = 171
e(N_over) = 1
e(N) = 172
e(k_eq) = 1
e(rank) = 1
macros:
e(cmdline) : "mean yc00"
e(cmd) : "mean"
e(vce) : "analytic"
e(title) : "Mean estimation"
e(estat_cmd) : "estat_vce_only"
e(varlist) : "yc00"
e(marginsnotok) : "_ALL"
e(properties) : "b V"
e(depvar) : "Mean"
matrices:
e(b) : 1 x 1
e(V) : 1 x 1
e(_N) : 1 x 1
e(error) : 1 x 1
functions:
e(sample)
Finally, I hit
. matrix list myATT myATU myBH1 myBH0 myTH
Stata says:
matrix myATT not found
r(111);
end of do-file
r(111);
Then, I hit matrix list y11 y01 y10 y00
And Stata says:
matrix y11 not found
r(111);
Thanks much.
Festus Amadu
I am new on this forum, and have searched through previous post to see if my question had been addressed earlier on, but I found none at least for now.
Can anyone please help with below? A bit long:
1). I need to estimate bootstrapped std. errors for the estimated ATT (Average treatment effect on the treated), ATU (Ave. treatment effect on the non-treated), etc.
I ran these post-estimation commands after movestay
. mspredict yc11, yc1_1 /*(predicted outcome of adopters should they have adopted...)*/
. mspredict yc00, yc2_1 /*(predicted outcome of non-adopters if they had not adopted or participated....)*/
.
. mspredict yc10, yc1_2 /*(predicted outcome of non-adopters had they adopted or participated......)*/
.
. mspredict yc01, yc2_2 /*(predicted outcome of adopters had they not adopted or participated.... */
Here are example outputs below:
mean yc11 = x1
mean yc01 = x2
mean yc10 = x3
mean yc00 = x4
. scalar myATT = y11-y01 = ##, say 4
. scalar myATU = y10-y00 = ##, say 2,5
. scalar myBH1 = y11-y10 = ##, say 1,5
. scalar myBH0 = y01-y00 = ##, say 1.9
. scalar myTH = myATT - myATU = ##, say 0.8
replace yc11=exp(yc11)
(172 real changes made)
. replace yc01=exp(yc01)
(636 real changes made)
. replace yc10=exp(yc10)
(636 real changes made)
. replace yc00=exp(yc00)
(172 real changes made)
I manually obtained the values above. Hence I need their standard errors for the difference.
I then hit put excel to transfer to excel so I could get the calculated scalers with appropriate std. errors:
2). Hence, my second question is:
How to effectively transfer these scalers from estimated commands in movestay to excel using putexcel? I tried the putexcel command below in Stata 14, but it didn't get the saved data into excel after my initial scalers directly from movestay. I wanted to have them all in excel for efficient formatting.
Here is the code I ran for putexcel:
. putexcel set EstimateLogYield,modify
.
. putexcel A1=("myATT") B1=("myATU") C1=("myBH1") D1=("myBH0") E1=("myTH") F1=("y11") G1=("y01") H1=("y10") I1=("y00")
file EstimateLogYield.xlsx saved
.
. putexcel A2=(scalar(myATT))
file EstimateLogYield.xlsx saved
.
. putexcel B2=(scalar(myATU))
file EstimateLogYield.xlsx saved
etc... .......
. ereturn list
scalars:
e(df_r) = 171
e(N_over) = 1
e(N) = 172
e(k_eq) = 1
e(rank) = 1
macros:
e(cmdline) : "mean yc00"
e(cmd) : "mean"
e(vce) : "analytic"
e(title) : "Mean estimation"
e(estat_cmd) : "estat_vce_only"
e(varlist) : "yc00"
e(marginsnotok) : "_ALL"
e(properties) : "b V"
e(depvar) : "Mean"
matrices:
e(b) : 1 x 1
e(V) : 1 x 1
e(_N) : 1 x 1
e(error) : 1 x 1
functions:
e(sample)
Finally, I hit
. matrix list myATT myATU myBH1 myBH0 myTH
Stata says:
matrix myATT not found
r(111);
end of do-file
r(111);
Then, I hit matrix list y11 y01 y10 y00
And Stata says:
matrix y11 not found
r(111);
Thanks much.
Festus Amadu
Comment