Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: RE: El-Badry correction help

From   Nanlesta Pilgrim <>
Subject   st: RE: El-Badry correction help
Date   Thu, 29 Sep 2011 07:20:40 -0700

Dear Statalist,
I'm sending again in hopes that someone might have an answer.

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?


Nanlesta Pilgrim, MPH, PhD
Post Doctoral Fellow
Department of Epidemiology
Department of Population, Family and Reproductive Health
Johns Hopkins Bloomberg School of Public Health

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index