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]
RE: st: Grouping income variables- RECODE COMMAND
From
"Antonio Rodriguez Andres" <[email protected]>
To
<[email protected]>
Subject
RE: st: Grouping income variables- RECODE COMMAND
Date
Tue, 4 Feb 2014 15:41:39 +0200
Nick
How can İ replace it? Following your advice, I did inspect the correlation matrix. Even I take out the income variable from
The regression I got the same message because other variable have missing values that are dropped after fitting the proposed model
xtmixed dprt age age2 gender married separated divorced widowed eduyrs ichldhm md ihealth iuemp5yr iue
> mp12m rgdp06[pw=dweight] if md==0 || cntry: gender , mle
note: md omitted because of collinearity
(29900 missing values generated)
corr dprt age age2 gender married separated divorced widowed eduyrs ichldhm lhincome ihealth iuemp5yr
> iuemp12m rgdp06
(obs=7603)
| dprt age age2 gender married separa~d divorced widowed eduyrs ichldhm
-------------+------------------------------------------------------------------------------------------
dprt | 1.0000
age | 0.0362 1.0000
age2 | 0.0344 0.9873 1.0000
gender | -0.1061 0.0104 0.0122 1.0000
married | -0.1207 0.1963 0.1659 -0.0281 1.0000
separated | 0.0569 0.0027 -0.0019 -0.0183 -0.1548 1.0000
divorced | 0.0666 0.1492 0.1310 -0.0626 -0.3864 -0.0509 1.0000
widowed | 0.1214 0.2423 0.2640 -0.1031 -0.2128 -0.0280 -0.0700 1.0000
eduyrs | -0.1361 -0.1775 -0.1952 0.0347 -0.0507 -0.0057 -0.0184 -0.1050 1.0000
ichldhm | -0.0224 -0.1226 -0.1785 -0.1365 0.3581 0.0154 -0.0526 -0.0514 -0.0162 1.0000
lhincome | -0.2870 0.0012 -0.0115 0.0759 0.1120 -0.0372 -0.0656 -0.1393 0.2788 0.0476
ihealth | -0.3977 -0.2372 -0.2354 0.0462 -0.0160 -0.0262 -0.0523 -0.1019 0.1917 0.0378
iuemp5yr | 0.0963 -0.3079 -0.2949 -0.0282 -0.1339 0.0165 -0.0017 -0.0592 -0.0385 -0.0452
iuemp12m | 0.1409 0.1413 0.1309 -0.0811 0.0222 0.0236 0.0263 0.0464 -0.1684 0.0189
rgdp06 | -0.1675 0.0719 0.0711 0.0655 -0.1079 0.0087 0.0550 -0.0602 0.1732 -0.0995
| lhincome ihealth iuemp5yr iuemp12m rgdp06
-------------+---------------------------------------------
lhincome | 1.0000
ihealth | 0.2654 1.0000
iuemp5yr | -0.2066 0.0106 1.0000
iuemp12m | -0.2059 -0.1309 0.1880 1.0000
rgdp06 | 0.6666 0.1738 -0.1166 -0.1008 1.0000
Antonio
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: Tuesday, February 04, 2014 3:35 PM
To: [email protected]
Subject: Re: st: Grouping income variables- RECODE COMMAND
-lhincome- is still in your model, still missing sometimes, and observations are still dropped from fitting whenever it is missing.
You need to replace -lhincome-.
Nick
[email protected]
On 4 February 2014 12:48, Antonio Rodriguez Andres <[email protected]> wrote:
> Dear Maarten
>
> Thank you very much for your feedback. What I did is the following
>
> http://www3.nd.edu/~rwilliam/stats2/l12.pdf
>
> *Create income midpoints
>
> recode hinctnt (1=900) (2=2700) (3=4800) (4=9000) (5=15000) (6=21000)
> (7=27000) (8= 33000) (9=48000) (10=75000) (11=105000) (12= 175200) ,
> gen(hincome) replace hincome=. if hinctnt==77 | hinctnt==88 |
> hinctnt==99 gen lhincome=log(hincome)
>
> **dummy indicator for missing income values
>
> gen xhincome=hincome
> replace xhincome= 29304.99 if missing(hincome) gen md=0 replace md=1
> if xhincome! =hincome
>
> xtmixed dprt age age2 gender married separated divorced widowed eduyrs
> ichldhm md lhincome ihealth iuemp5yr iuemp12m rgdp06[pw=dweight] if
> md==0 || cntry: gender , mle
>
>
> But I still got the same message, the md indicator variable is dropped. How can İ estimate the model controlling for missing values in income?
>
> Antonio
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Maarten
> Buis
> Sent: Tuesday, February 04, 2014 2:26 PM
> To: [email protected]
> Subject: Re: st: Grouping income variables- RECODE COMMAND
>
> On Tue, Feb 4, 2014 at 12:29 PM, Antonio Rodriguez Andres wrote:
>
>> First of all, I recode the household income variable using mıd-points. The problem is defining a midpoint for the open ended top category. For that purpose, I follow Hout (2004).
>> *Create income midpoints
>> recode hinctnt (1=900) (2=2700) (3=4800) (4=9000) (5=15000) (6=21000)
>> (7=27000) (8= 33000) (9=48000) (10=75000) (11=105000) (12= 175200) ,
>> gen(hincome) replace hincome=. if hinctnt==77 | hinctnt==88 |
>> hinctnt==99 // I recode hinctnt= 77 & 88 & 99 (Don’t Know, Refusal, No answer) as missing values gen lhincome=log(hincome) I also need to include in my regression a dummy variable for the mıssing values corresponding to income. I type in Stata.
>> gen missinc=0
>> replace missinc=1 if missing(hincome)
>>
>> When estimating the following model, the dummy variable for missing values for income is dropped but ıt has to be in my model. Is there anything wrong with the Stata code?
>
> Two comments:
>
> First, don't do this, this is not a good way of dealing with missing values. See e.g.
> <http://www.stata.com/statalist/archive/2007-12/msg00030.html>
>
> Second, mechanically what is going on that most estimation commands exclude all observations that include at least one missing value on any of the variables included in the model. If you exclude all observations for which lhincome is missing than missinc will be a constant containing only 0, and will thus be excluded.
>
> Hope this helps,
> Maarten
>
> ---------------------------------
> Maarten L. Buis
> WZB
> Reichpietschufer 50
> 10785 Berlin
> Germany
>
> http://www.maartenbuis.nl
> ---------------------------------
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/