ProjectMOSAIC / mosaicData

R package with Project MOSAIC datasets
5 stars 6 forks source link

Recode Gestation data set? #33

Closed rpruim closed 4 years ago

rpruim commented 4 years ago

There are some ugly coding conventions in this data set:

plurality 5 = single fetus (same for all)

sex = 1 for every row in the data

outcome 1 = live birth that survived at least 28 days (same for all)

date birth date where 1096=January 1, 1961 (ugly date format, and example doesn't explain coding scheme)

race mother's race: 0-5=white 6=mex 7=black 8=asian 9=mixed

ed mother's education: 0= less than 8th grade, 1 = 8th -12th grade - did not graduate, 2= HS graduate–no other schooling, 3= HS+trade, 4=HS+some college, 5=College graduate, 6=Trade school, 7=HS unclear

wt.1 mother's prepregnancy weight (in pounds) -- could use a better name

marital marital status: 1=married, 2=legally separated, 3=divorced, 4=widowed, 5=never married

inc family yearly income in $2500 increments: 0=under 2500, 1=2500-4999, ..., 8=12,500-14,999, 9=15000+

smoke does mother smoke? 0=never, 1=smokes now, 2=until current pregnancy, 3=once did, not now

time time since quitting smoking: 0=never smoked, 1=still smokes, 2=during current preg, 3=within 1 year, 4=1 to 2 years ago, 5= 2 to 3 years ago, 6= 3 to 4 years ago, 7=5 to 9 years ago, 8=10+ years ago, 9=quit and don't know

number number of cigarettes smoked per day for past and current smokers 0=never, 1=1-4, 2=5-9, 3=10-14, 4=15-19, 5=20-29, 6=30-39, 7=40-60, 8=60+, 9=smoke but don't know

rpruim commented 4 years ago

@dtkaplan @nicholasjhorton : Do either of you know the history of how this data set entered the package? The reference in the documentation does not seem to lead to the same data set.

nicholasjhorton commented 4 years ago

Alas, I don't. Danny?

rpruim commented 4 years ago

I was able to locate some online documentation that seemed to match the way we documented this data set. I've recoded several variables.