I am having trouble with identifying parents who are a) uninsured and b) non-citizens of U.S born children enrolled in Medicaid and not enrolled. I am unsure of what variables to use in IPUMS USA or if I should look into other IPUMS data sets such as CPS or NHGIS. If so, what variables should I use?
The variables I have used are “PUMA”,“SERIALNO” “AGEP”, “HINS4”, “HICOV”,“CIT”,“NOP”, and "FPARC”.
In the example below I used “NOP, AGEP, and CIT” to identify US-citizen children with non-native parents. However I don’t think this approach would be correct to identify parents who are both uninsured and noncitizens with US born insured children.
as_survey_design(weights = PWGTP)%>%#set weights for estimation (I don’t know why but if I move this line after group_by, 3 groups don’t show)
filter(NOP ==6|8)%>% #filter for children living with two parents where either the mother or father is foreign born
filter(AGEP <= 18)%>% #filter for only children under 18
filter(CIT >=1 & CIT <=4)%>% #filtering for children who are citizens
mutate(age_group = case_when(AGEP == 0 & AGEP <=1 ~ “Infant”, #creating age groups for children
AGEP >1 & AGEP <=5 ~ “Children 0-5”,
AGEP >=6 & AGEP<= 18 ~ “Children 6-18”))%>%
group_by(age_group)%>% #grouping by age group
summarize(health_child = survey_mean(HICOV==1, na.rm =TRUE),# % of children who have health insurance
nohealth_child = survey_mean(HICOV==2, na.rm =TRUE),# % of children who do not have health insurance
medicaid_child = survey_mean(HINS4==1, na.rm =TRUE),# % of children who are enrolled in Medicaid
n = unweighted(n()))#gives me raw count
I am currently trying this out with one state before analyzing for all states. It also helps with analyzing a smaller data set for one set vs. for all.
Any guidance is appreciated!