Old syntax working with stata10 but not 11
Verfasst: Do 7. Feb 2013, 18:16
Hey,
I am trying to replicate a paper by Sachs and Warner '97.
But the code they use to check for outliers doesn't work with stata 11.2
An outlier should be excluded if "|dfits| > 2(k/n)^(1/2)" while k is the number of regressors and n is the sample size
Their code:
fit gea7090 lgdpea70 sxp sopen
drop dfits
fpredict dfits, dfits
gsort -dfits
* list country dfits shcode6 if dfits~=.
drop excl1
generate excl1=0
replace excl1=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list country dfits if dfits~=. & excl1==1,
Now my question is, how can I change this code to work with Stata11.2
Thanks in advance
Daniel
I am trying to replicate a paper by Sachs and Warner '97.
But the code they use to check for outliers doesn't work with stata 11.2
An outlier should be excluded if "|dfits| > 2(k/n)^(1/2)" while k is the number of regressors and n is the sample size
Their code:
fit gea7090 lgdpea70 sxp sopen
drop dfits
fpredict dfits, dfits
gsort -dfits
* list country dfits shcode6 if dfits~=.
drop excl1
generate excl1=0
replace excl1=1 if abs(dfits)> 2*((_result(3)+1)/(_result(1)))^(1/2)
list country dfits if dfits~=. & excl1==1,
Now my question is, how can I change this code to work with Stata11.2
Thanks in advance
Daniel