Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: El-Badry correction help


From   Nanlesta Pilgrim <[email protected]>
To   [email protected]
Subject   st: RE: El-Badry correction help
Date   Wed, 28 Sep 2011 13:15:57 -0400

Dear Statalist,

What am I missing? I am trying to apply the El-Badry correction to census data.

I began by creating a counting variable within each age category (15-49).
Then I did the following:

regress pnsborn pzeroborn  /*restricting the analysis to the first observation*/
predict yhat /*predicted values from the regression model*/

*Produced a scatter plot with regression line added
graph twoway lfit pnsborn pzeroborn || scatter pnsborn pzeroborn

*Compute residuals, create new variable residuals:
predict residuals, resid

*Produce a residual plot by age groups with horizontal line at 0
*Should be no pattern
twoway (connected residuals age3, sort), ytitle(residuals) yline(0)
xlabel(#12, labels valuelabel)

The graph is actually showing a pattern- when there should be none.
What have I either done wrong or failed to add?

Thanks!
Terri

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index