Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: impute vs. predict


From   Caleb Southworth <[email protected]>
To   [email protected]
Subject   st: impute vs. predict
Date   Thu, 1 Mar 2007 12:50:53 -0800 (PST)

What is the difference between -impute- and -reg- followed by
-predict-?

For example:

. impute t_aflcio_mem temp year if inrange(year,1956,2005),
g(i_aflcio_mem)
 44.00% (22) observations imputed

. quietly reg t_aflcio_mem temp year if inrange(year,1956,2005)

. predict yhat if inrange(year,1956,2005)
(option xb assumed; fitted values)
(77 missing values generated)

. list year i_aflcio_mem yhat in 77/87

     +----------------------------+
     | year   i_aflc~m       yhat |
     |----------------------------|
 77. | 1956    15707.5   14748.04 |
 78. | 1957    15965.1   15062.62 |
 79. | 1958    13849.3    14816.2 |
 80. | 1959    13701.4   14569.78 |
 81. | 1960    13866.6   14336.76 |
     |----------------------------|
 82. | 1961    13618.2   14103.74 |
 83. | 1962    13784.8   14021.69 |
 84. | 1963    13904.2   13939.65 |
 85. | 1964    14235.3   14286.39 |
 86. | 1965    14815.9   14633.13 |
     |----------------------------|
 87. | 1966    15372.1   15372.03 |

. pwcorr yhat i_aflcio_mem

             |     yhat i_aflc~m
-------------+------------------
        yhat |   1.0000
i_aflcio_mem |   0.8947   1.0000

OK, so the reg prediction and imputation differ, but why? -eret li-
indicates that -impute- is -regress-.

Thanks!

Caleb
[email protected]
University of Oregon Sociology
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index