Libname sasin "l:/cohort 1/grade 0 (kindergarten)/parent interview"; Libname sasout "d:/work/family info form"; **Need to create aggregated dataset**; Data one; set sasin.dp1b1 sasin.np1b1 sasin.pp1b1 sasin.sp1b1; drop cp1b1-cp1b12 cp1b16-cp1b19 cp1b22-cp1b25 cp1b29-cp1b30 ; run; PROC SORT ; BY SITE TCID ; run; DATA two; SET one; **Coding odd responses to missing**; if p1b3=9 then p1b3=.; if p1b4=9 then p1b4=.; if p1b6=9 then p1b6=.; if p1b10=9 then p1b10=.; if p1b12=9 then p1b12=.; if p1b16=5 then p1b16=.; if p1b16=9 then p1b16=.; if p1b19=7 then p1b19=.; if p1b19=9 then p1b19=.; if p1b23=7 then p1b23=.; if p1b23=9 then p1b23=.; if p1b25=9 then p1b25=.; if p1b29=8 then p1b29=.; if p1b29=9 then p1b29=.; if p1b5=99 then p1b5=.; if p1b7=99 then p1b7=.; if p1b15=99 then p1b15=.; if p1b20=99 then p1b20=.; if p1b21=99 then p1b21=.; if p1b28=99 then p1b28=.; if p1b11=8 then p1b11=.; if p1b11=9 then p1b11=.; if p1b11=10 then p1b11=.; if p1b11=11 then p1b11=.; if p1b11=12 then p1b11=.; if p1b11=60 then p1b11=.; if p1b11=91 then p1b11=.; if p1b11=99 then p1b11=.; if p1b24=8 then p1b24=.; if p1b24=9 then p1b24=.; if p1b24=10 then p1b24=.; if p1b24=11 then p1b24=.; if p1b24=12 then p1b24=.; if p1b24=60 then p1b24=.; if p1b24=99 then p1b24=.; Data three; set two; timetogether = p1b20 + (p1b21/12); Label timetogether = "Years parents have been married or have lived together"; Data sasout.FIF1; Set three; Proc contents; Run; Proc freq; Tables p1b2-p1b8 p1b10-p1b12 p1b14-p1b21 p1b23-p1b25 p1b27-p1b30 p1bses p1bsesc p1bfamoc timetogether; Run;