> Variable | Obs Mean Std. Dev. Min Max
> -------------+--------------------------------------------------------
> fdi_inflow.. | 4664 5.97e+08 2.85e+09 -4.55e+09 5.05e+10
>
> Variable | Obs Mean Std. Dev. Min Max
> -------------+--------------------------------------------------------
> fdi_inflow.. | 3975 2.00564 5.148409 -82.89212 89.08587
I take this to mean that for some observations you have fdi_inflow_real
values but no corresponding GDP values and the missing values are occurring
for particular cow levels.
You can work around this by using -capture- to suppress output if there is
an error (see [P] capture for the details).
You could also nest this within an additional -foreach- loop to cycle
through various dependent variables.
For example:
webuse grunfeld,clear
replace invest = . if com == 1
tempfile results
tempname hold
postfile `hold' company pvalue test_stat using `results'
levelsof company, local(levels)
foreach l of local levels {
capture {
dfuller invest if com == `l'
}
if _rc == 0 {
post `hold' (`l') (r(p)) (r(Zt))
}
else {
post `hold' (`l') (.) (.)
}
}
postclose `hold'
preserve
use `results', clear
l
restore
Scott
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/