My code is below, whenever I try and execute it, it gives me an error that says,
"command outreg2 is unrecognized
r(199)".
Any help would be appreciated.
"forval i=1/12 {
if strpos("`variationname`i''", "Non") == 0 {
reg `variation`i'' if (time>52 & time <323),
if `i'==1 outreg2 using "`filename'",replace dta stats(coef se pval) noaster auto(8) adjr2 ctitle(variation`i' `variationname`i'')
else outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) adjr2 ctitle(variation`i' `variationname`i'')
quietly newey `variation`i'' if (time>52 & time <323), lag(5)
outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) ctitle(Newey variation`i' `variationname`i'')
}
else {
quietly reg `variation`i'' if (time>209 & time <323),
outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) adjr2 ctitle(variation`i' `variationname`i'')
newey `variation`i'' if (time>209 & time <323), lag(4)
outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) ctitle(Newey variation`i' `variationname`i'')
}
predict projvariation`i'
if strpos("`variationname`i''", "Price") == 0 replace projvariation`i' = projvariation`i' * (1000000)
if strpos("`variationname`i''", "Non") == 0 replace projvariation`i' = . in 1/52
else replace projvariation`i' = . in 1/209
}
"command outreg2 is unrecognized
r(199)".
Any help would be appreciated.
"forval i=1/12 {
if strpos("`variationname`i''", "Non") == 0 {
reg `variation`i'' if (time>52 & time <323),
if `i'==1 outreg2 using "`filename'",replace dta stats(coef se pval) noaster auto(8) adjr2 ctitle(variation`i' `variationname`i'')
else outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) adjr2 ctitle(variation`i' `variationname`i'')
quietly newey `variation`i'' if (time>52 & time <323), lag(5)
outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) ctitle(Newey variation`i' `variationname`i'')
}
else {
quietly reg `variation`i'' if (time>209 & time <323),
outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) adjr2 ctitle(variation`i' `variationname`i'')
newey `variation`i'' if (time>209 & time <323), lag(4)
outreg2 using "`filename'",append dta stats(coef se pval) noaster auto(8) ctitle(Newey variation`i' `variationname`i'')
}
predict projvariation`i'
if strpos("`variationname`i''", "Price") == 0 replace projvariation`i' = projvariation`i' * (1000000)
if strpos("`variationname`i''", "Non") == 0 replace projvariation`i' = . in 1/52
else replace projvariation`i' = . in 1/209
}
Comment