Question

Status:Closed    Asked:Apr 25, 2018 - 03:16 PM

Children under 18 in CPS Household

I am trying to create a variable for number children under 18 in the household. My code is returning nonsensical values. Do I only use relate to finding them? Thanks.

 
Do you have the same question? Follow this Question
 

Staff Answer

In order to identify the number of children under 18 in a household you will want to make use of RELATE and AGE. RELATE will help you identify who is a child and AGE will allow you identify the age of each child.

If you still have issues with your code, you can email ipums@umn.edu and we will work to figure out what the issue is.

 

Apr 26, 2018 - 03:20 PM

0
0
Report it

The only difference between your analysis and the forum post you reference would be that you will want to limit your analysis to female-headed households. Are you then merging using YEAR, DATANUM, and SERIAL? Maybe you can share your code with us either here (or email ipums@umn.edu) and we can help pinpoint the issue.

 

Apr 30, 2018 - 04:31 PM

0
0
Report it

Does the file you merge with (cps_ukcpr_wrd_data) have any manipulations from the original data set? I was able to successfully merge " single_mom" with the original extract using your code. Maybe try re-saving the extract and re-running your code.

 

May 02, 2018 - 04:49 PM

0
0
Report it

Answers

Thanks Michelle. I think I figured it out. But now I have an additional question regarding single mother households. I am trying to create single mother households in CPS. I followed a previous answer from IPUMS ((http://answers.popdata.org/how-create...)


I have followed all the steps until the merge. But the merge keeps error saying year serial do not uniquely identify observations in the using data. I do not have any duplicates (I checked for that). I am not sure if it's the right way to create single mother households.

 

Apr 30, 2018 - 01:45 PM

0
0
Report it

The only difference between your analysis and the forum post you reference would be that you will want to limit your analysis to female-headed households. Are you then merging using YEAR, DATANUM, and SERIAL? Maybe you can share your code with us either here (or email ipums@umn.edu) and we can help pinpoint the issue.

 

Apr 30, 2018 - 04:31 PM

0
0
Report it

Michelle,


Here is the code I am using :


gen single_mom =1 if (relate==0101 & married==0 & nchild >0)

replace single_mom = 0 if single_mom==.


drop if single_mom==0


save single_mom, replace


*------------------------------------------------------------------------------
------------------------


*use "cps_ukcpr_wrd_data"


merge m:1 year serial using "single_mom"


rename _merge merge3


save cps_ukcpr_wrd_data,replace*

 

May 01, 2018 - 10:24 AM

0
0
Report it

Does the file you merge with (cps_ukcpr_wrd_data) have any manipulations from the original data set? I was able to successfully merge " single_mom" with the original extract using your code. Maybe try re-saving the extract and re-running your code.

 

May 02, 2018 - 04:49 PM

0
0
Report it

Yes I did manipulate the data. But I will re save and re merge it. Thanks.

 

May 03, 2018 - 10:46 AM

0
0
Report it

OTHER QUESTIONS NEEDING ANSWERS

In ATUS, there's a variable for "child under 18 present in household", how ca...
Number of children under 18 in household
Number of children between the ages of 0-6 and 7-18 in IHIS data?
Single Fathers living with children under 18
Login   |   Register

Recently Active Members

View More »

Share |