********************************************************************************* * PROGRAM: PVIC1 * * * * PROGRAMMER: LILLI (MODIFIED BY BOBBY) * * * * DATE: 1/6/98 * * * * PURPOSE: This program scores the PVI -- both the parent and child behavior * * and the contextual variables sections. * * INPUT: OxD datasets * * * * OUTPUT: PVI scored datasets * * * * NOTE: This scoring program was obtained from Hyoshin Kim. It appears to * * incorporate the scoring of the PVI as described in the technical * * reports prepared in 1996. * * * * MODIFIED: 11/27/01 by Patrick Malone to run off aggregated datasets. Also * * reverses CFI scores in 1991 and 1992 to match later years. * *********************************************************************************; **Fill out information in next section for data processed in this run. **; %let source=Observer; %let src=o; %let inst=b; %let longname=PVRIparent; %let scoredname=PVI; **Enter high-level path (e.g., l:\datasets) **; %let path=l:\datasets; **Enter year of data collection **; %let yr=11; **Enter variable which must be present to retain record (typically interviewer id) **; %let screen=screen; **Specify Lib for input datasets **; Libname SASIN "&path.\&source.\&longname.\U"; **Specify Lib for output datasets **; Libname SASOUT "&path.\&source.\&longname.\S"; ****** DO NOT MODIFY BELOW THIS LINE **************; %macro linsum; data &INDATA; set &INDATA; label &var_name = "&var_labl"; array sumvars {*} &var_list; if n(of sumvars(*))>=.5*dim(sumvars) then &var_name=mean(of sumvars(*))*dim(sumvars); proc sort; by site tcid; run; %mend linsum; %macro score; %if &yr.<11 %then %do; data one; set SASIN.&src.&yr.&inst; if &screen = '' then &screen = obsrvrid; if &screen = '' then &screen = intid; if &screen ne ''; *recode 0 (cant rate) as missing; array all (*) o&yr.&inst.HE1-o&yr.&inst.HE18 o&yr.&inst.MB1-o&yr.&inst.MB11 o&yr.&inst.FB1-o&yr.&inst.FB11 o&yr.&inst.CB1-o&yr.&inst.CB7; array all_r (*) o&yr.&inst.HE1r o&yr.&inst.HE2r o&yr.&inst.HE3r o&yr.&inst.HE4r o&yr.&inst.HE5r o&yr.&inst.HE6r o&yr.&inst.HE7r o&yr.&inst.HE8r o&yr.&inst.HE9r o&yr.&inst.HE10r o&yr.&inst.HE11r o&yr.&inst.HE12r o&yr.&inst.HE13r o&yr.&inst.HE14r o&yr.&inst.HE15r o&yr.&inst.HE16r o&yr.&inst.HE17r o&yr.&inst.HE18r o&yr.&inst.MB1r o&yr.&inst.MB2r o&yr.&inst.MB3r o&yr.&inst.MB4r o&yr.&inst.MB5r o&yr.&inst.MB6r o&yr.&inst.MB7r o&yr.&inst.MB8r o&yr.&inst.MB9r o&yr.&inst.MB10r o&yr.&inst.MB11r o&yr.&inst.FB1r o&yr.&inst.FB2r o&yr.&inst.FB3r o&yr.&inst.FB4r o&yr.&inst.FB5r o&yr.&inst.FB6r o&yr.&inst.FB7r o&yr.&inst.FB8r o&yr.&inst.FB9r o&yr.&inst.FB10r o&yr.&inst.FB11r o&yr.&inst.CB1r o&yr.&inst.CB2r o&yr.&inst.CB3r o&yr.&inst.CB4r o&yr.&inst.CB5r o&yr.&inst.CB6r o&yr.&inst.CB7r ; do l=1 to dim(all); all_r(l)= all(l); IF all_r(l)=0 THEN all_r(l)=.; end; *then reverse the values; array one_r (11) o&yr.&inst.HE1r o&yr.&inst.HE2r o&yr.&inst.HE3r o&yr.&inst.HE4r o&yr.&inst.HE5r o&yr.&inst.HE6r o&yr.&inst.HE7r o&yr.&inst.HE8r o&yr.&inst.HE9r o&yr.&inst.HE10r o&yr.&inst.HE11r; do m=1 to 11; one_r(m)= 2-one_r(m); end; *reversed item he15; o&yr.&inst.HE15r=5-o&yr.&inst.HE15r; *recode st rural=1, resid=2, resid/comm=3, and comm=4; IF (o&yr.&inst.HE16r=4) THEN o&yr.&inst.HE16r=0; o&yr.&inst.HE16r=o&yr.&inst.HE16r+1; *reversed item mb9; o&yr.&inst.mb9r=4-o&yr.&inst.mb9r; *create utilities scale; &scoredname.&YR.UTL = o&yr.&inst.HE7r +o&yr.&inst.HE10r; label &scoredname.&YR.UTL = "PVIC Y&yr. Utilities" O&yr.&inst.HE1r="Recoded-TC Has an Indoor Play Area" O&yr.&inst.HE2r="Recoded-Age-Appropriate Toys Available to TC" O&yr.&inst.HE3r="Recoded-TC Has Secure Place for Personal Things" O&yr.&inst.HE4r="Recoded-Environment Allows Free Movement" O&yr.&inst.HE5r="Recoded-TC Has an Outdoor Play Area" O&yr.&inst.HE6r="Recoded-Family Has a Pet" O&yr.&inst.HE7r="Recoded-Family Has a Telephone" O&yr.&inst.HE8r="Recoded-At Least 8 Books are Visible" O&yr.&inst.HE9r="Recoded-At Least 2 Children's Books Visible" O&yr.&inst.HE10r="Recoded-Family Has TV, Stereo, or Radio" O&yr.&inst.HE11r="Recoded-Basic Hygiene Appears to be Observed" O&yr.&inst.HE12r="Recoded-How Clean is this Dwelling" O&yr.&inst.HE13r="Recoded-How Safe is Interior of Dwelling" O&yr.&inst.HE14r="Recoded-How Many Rooms are in this Dwelling" O&yr.&inst.HE15r="Recoded-How Safe is Area Outside of Dwelling" O&yr.&inst.HE16r="Recoded-Street Where Dwelling is Located" O&yr.&inst.HE17r="Recoded-Noise-Level in Neighborhood" O&yr.&inst.HE18r="Recoded-Safety of Neighborhood" O&yr.&inst.CB1r="Recoded-TC Complied w/ Parental Request" O&yr.&inst.CB2r="Recoded-TC Refused to Comply w/ Parental Request" O&yr.&inst.CB3r="Recoded-TC Did Something Extra Positive for Par." O&yr.&inst.CB4r="Recoded-TC Talked Positively w/ Parent" O&yr.&inst.CB5r="Recoded-TC Verbalized Anger Toward Parent" O&yr.&inst.CB6r="Recoded-TC was Physically Affectionate to Parent" O&yr.&inst.CB7r="Recoded-TC was Physically Aggressive to Parent" O&yr.&inst.MB1r="Recoded-Mother Shouted at Child" O&yr.&inst.MB2r="Recoded-Mother Expressed Anger Toward Child" O&yr.&inst.MB3r="Recoded-Mother Threatened Child" O&yr.&inst.MB4r="Recoded-Mother Used Sarcasm Toward Child" O&yr.&inst.MB5r="Recoded-Mother Hit(Grabbed, Swatted, etc.) Child" O&yr.&inst.MB6r="Recoded-Mother Spoke to TC w/ Positive Tone" O&yr.&inst.MB7r="Recoded-Mother Gave Rationales when Appropriate" O&yr.&inst.MB8r="Recoded-Mother Gave Attention when Child Talked" O&yr.&inst.MB9r="Recoded-Mother Ignored Positive Behaviors of TC" O&yr.&inst.MB10r="Recoded-Mother Ignored Child Misbehaviors" O&yr.&inst.MB11r="Recoded-M. Positively Reinforced Positive Behav." O&yr.&inst.FB1r="Recoded-Father Shouted at Child" O&yr.&inst.FB2r="Recoded-Father Expressed Anger Toward Child" O&yr.&inst.FB3r="Recoded-Father Threatened Child" O&yr.&inst.FB4r="Recoded-Father Used Sarcasm Toward Child" O&yr.&inst.FB5r="Recoded-Father Hit(Grabbed, Swatted, etc.) Child" O&yr.&inst.FB6r="Recoded-Father Spoke to TC w/ Positive Tone" O&yr.&inst.FB7r="Recoded-Father Gave Rationales when Appropriate" O&yr.&inst.FB8r="Recoded-Father Gave Attention when Child Talked" O&yr.&inst.FB9r="Recoded-Father Ignored Positive Behaviors of TC" O&yr.&inst.FB10r="Recoded-Father Ignored Child Misbehaviors" O&yr.&inst.FB11r="Recoded-F. Positively Reinforced Positive Behav." ; drop l m; run; %let indata= one; /* Home and Neigborhood Environment Scales */ %let var_name = &scoredname.&YR.CFI; %let var_labl = %str(&scoredname. Y&yr. Child-Friendly Interior) ; %let var_list = %str(o&yr.&inst.HE1r o&yr.&inst.HE2r o&yr.&inst.HE3r o&yr.&inst.HE4r o&yr.&inst.HE5r o&yr.&inst.HE6r o&yr.&inst.HE8r o&yr.&inst.HE9r); %linsum ; %let var_name = &scoredname.&YR.NEI ; %let var_labl = %str(&scoredname. Y&yr. Neighborhood Environment) ; %let var_list = %str(o&yr.&inst.HE15r o&yr.&inst.HE17r o&yr.&inst.HE16r o&yr.&inst.HE18r); %linsum ; %let var_name = &scoredname.&YR.HOM ; %let var_labl = %str(&scoredname. Y&yr. Home Environment) ; %let var_list = %str(o&yr.&inst.HE12r o&yr.&inst.HE13r o&yr.&inst.HE14r); %linsum ; /* harsh discipline */ %let var_name = &scoredname.&YR.HPD ; %let var_labl = %str(&scoredname. Y&yr. Harsh/Physical Discipline) ; %let var_list = %str(o&yr.&inst.mb1r o&yr.&inst.mb2r o&yr.&inst.mb3r o&yr.&inst.mb4r o&yr.&inst.mb5r); %linsum ; /* parental warmth */ /* drop o&yr.&inst.mb9r from scale */ %let var_name = &scoredname.&YR.PWM ; %let var_labl = %str(&scoredname. Y&yr. Parental Warmth) ; %let var_list = %str(o&yr.&inst.mb6r o&yr.&inst.mb8r o&yr.&inst.mb11r); %linsum ; /*Parent/Child Interaction: Warmth */ /* can drop o&yr.&inst.cb4 to improve alpha slightly */ %let var_name = &scoredname.&YR.CWM; %let var_labl = %str(&scoredname. Y&yr. Child Warmth toward Mother) ; %let var_list = %str(o&yr.&inst.cb3 o&yr.&inst.cb4r o&yr.&inst.cb6); %linsum ; /*Parent/Child Interaction: noncompliance/anger/aggression */ /* drop o&yr.&inst.cb1r */ %let var_name = &scoredname.&YR.CNC; %let var_labl = %str(&scoredname. Y&yr. Child Noncompliance toward Mother) ; %let var_list = %str(o&yr.&inst.cb2r o&yr.&inst.cb5r o&yr.&inst.cb7r); %linsum ; data SASOUT.&scoredname.&yr.; set one; if (&yr = 1 and (cohort='1' or cohort='2')) or (&yr = 2 and cohort='1') then &scoredname.&yr.cfi=8-&scoredname.&yr.cfi; run; %end; %if &yr.>10 %then %do; data one; set SASIN.&src.&yr.&inst; if &screen = '' then &screen = obsrvrid; if &screen = '' then &screen = intid; if &screen ne ''; *recode 0 (cant rate) as missing; array all (*) o&yr.&inst.HE1-o&yr.&inst.HE18 o&yr.&inst.MB1-o&yr.&inst.MB11 o&yr.&inst.FB1-o&yr.&inst.FB11 o&yr.&inst.CB1-o&yr.&inst.CB7; array all_r (*) o&yr.&inst.HE1r o&yr.&inst.HE2r o&yr.&inst.HE3r o&yr.&inst.HE4r o&yr.&inst.HE5r o&yr.&inst.HE6r o&yr.&inst.HE7r o&yr.&inst.HE8r o&yr.&inst.HE9r o&yr.&inst.HE10r o&yr.&inst.HE11r o&yr.&inst.HE12r o&yr.&inst.HE13r o&yr.&inst.HE14r o&yr.&inst.HE15r o&yr.&inst.HE16r o&yr.&inst.HE17r o&yr.&inst.HE18r o&yr.&inst.MB1r o&yr.&inst.MB2r o&yr.&inst.MB3r o&yr.&inst.MB4r o&yr.&inst.MB5r o&yr.&inst.MB6r o&yr.&inst.MB7r o&yr.&inst.MB8r o&yr.&inst.MB9r o&yr.&inst.MB10r o&yr.&inst.MB11r o&yr.&inst.FB1r o&yr.&inst.FB2r o&yr.&inst.FB3r o&yr.&inst.FB4r o&yr.&inst.FB5r o&yr.&inst.FB6r o&yr.&inst.FB7r o&yr.&inst.FB8r o&yr.&inst.FB9r o&yr.&inst.FB10r o&yr.&inst.FB11r o&yr.&inst.CB1r o&yr.&inst.CB2r o&yr.&inst.CB3r o&yr.&inst.CB4r o&yr.&inst.CB5r o&yr.&inst.CB6r o&yr.&inst.CB7r ; do l=1 to dim(all); all_r(l)= all(l); IF all_r(l)=0 THEN all_r(l)=.; end; *then reverse the values; array one_r (11) o&yr.&inst.HE1r o&yr.&inst.HE2r o&yr.&inst.HE3r o&yr.&inst.HE4r o&yr.&inst.HE5r o&yr.&inst.HE6r o&yr.&inst.HE7r o&yr.&inst.HE8r o&yr.&inst.HE9r o&yr.&inst.HE10r o&yr.&inst.HE11r; do m=1 to 11; one_r(m)= 2-one_r(m); end; *reversed item he15; o&yr.&inst.HE15r=5-o&yr.&inst.HE15r; *recode st rural=1, resid=2, resid/comm=3, and comm=4; IF (o&yr.&inst.HE16r=4) THEN o&yr.&inst.HE16r=0; o&yr.&inst.HE16r=o&yr.&inst.HE16r+1; *reversed item mb9; o&yr.&inst.mb9r=4-o&yr.&inst.mb9r; *create utilities scale; &scoredname.&YR.UTL = o&yr.&inst.HE7r +o&yr.&inst.HE10r; label &scoredname.&YR.UTL = "PVIC Y&yr. Utilities" O&yr.&inst.HE1r="Recoded-TC Has an Indoor Play Area" O&yr.&inst.HE2r="Recoded-Age-Appropriate Toys Available to TC" O&yr.&inst.HE3r="Recoded-TC Has Secure Place for Personal Things" O&yr.&inst.HE4r="Recoded-Environment Allows Free Movement" O&yr.&inst.HE5r="Recoded-TC Has an Outdoor Play Area" O&yr.&inst.HE6r="Recoded-Family Has a Pet" O&yr.&inst.HE7r="Recoded-Family Has a Telephone" O&yr.&inst.HE8r="Recoded-At Least 8 Books are Visible" O&yr.&inst.HE9r="Recoded-At Least 2 Children's Books Visible" O&yr.&inst.HE10r="Recoded-Family Has TV, Stereo, or Radio" O&yr.&inst.HE11r="Recoded-Basic Hygiene Appears to be Observed" O&yr.&inst.HE12r="Recoded-How Clean is this Dwelling" O&yr.&inst.HE13r="Recoded-How Safe is Interior of Dwelling" O&yr.&inst.HE14r="Recoded-How Many Rooms are in this Dwelling" O&yr.&inst.HE15r="Recoded-How Safe is Area Outside of Dwelling" O&yr.&inst.HE16r="Recoded-Street Where Dwelling is Located" O&yr.&inst.HE17r="Recoded-Noise-Level in Neighborhood" O&yr.&inst.HE18r="Recoded-Safety of Neighborhood" O&yr.&inst.CB1r="Recoded-TC Complied w/ Parental Request" O&yr.&inst.CB2r="Recoded-TC Refused to Comply w/ Parental Request" O&yr.&inst.CB3r="Recoded-TC Did Something Extra Positive for Par." O&yr.&inst.CB4r="Recoded-TC Talked Positively w/ Parent" O&yr.&inst.CB5r="Recoded-TC Verbalized Anger Toward Parent" O&yr.&inst.CB6r="Recoded-TC was Physically Affectionate to Parent" O&yr.&inst.CB7r="Recoded-TC was Physically Aggressive to Parent" O&yr.&inst.MB1r="Recoded-Mother Shouted at Child" O&yr.&inst.MB2r="Recoded-Mother Expressed Anger Toward Child" O&yr.&inst.MB3r="Recoded-Mother Threatened Child" O&yr.&inst.MB4r="Recoded-Mother Used Sarcasm Toward Child" O&yr.&inst.MB5r="Recoded-Mother Hit(Grabbed, Swatted, etc.) Child" O&yr.&inst.MB6r="Recoded-Mother Spoke to TC w/ Positive Tone" O&yr.&inst.MB7r="Recoded-Mother Gave Rationales when Appropriate" O&yr.&inst.MB8r="Recoded-Mother Gave Attention when Child Talked" O&yr.&inst.MB9r="Recoded-Mother Ignored Positive Behaviors of TC" O&yr.&inst.MB10r="Recoded-Mother Ignored Child Misbehaviors" O&yr.&inst.MB11r="Recoded-M. Positively Reinforced Positive Behav." O&yr.&inst.FB1r="Recoded-Father Shouted at Child" O&yr.&inst.FB2r="Recoded-Father Expressed Anger Toward Child" O&yr.&inst.FB3r="Recoded-Father Threatened Child" O&yr.&inst.FB4r="Recoded-Father Used Sarcasm Toward Child" O&yr.&inst.FB5r="Recoded-Father Hit(Grabbed, Swatted, etc.) Child" O&yr.&inst.FB6r="Recoded-Father Spoke to TC w/ Positive Tone" O&yr.&inst.FB7r="Recoded-Father Gave Rationales when Appropriate" O&yr.&inst.FB8r="Recoded-Father Gave Attention when Child Talked" O&yr.&inst.FB9r="Recoded-Father Ignored Positive Behaviors of TC" O&yr.&inst.FB10r="Recoded-Father Ignored Child Misbehaviors" O&yr.&inst.FB11r="Recoded-F. Positively Reinforced Positive Behav." ; drop l m; run; %let indata= one; /* Home and Neigborhood Environment Scales */ %let var_name = &scoredname.&YR.NEI ; %let var_labl = %str(&scoredname. Y&yr. Neighborhood Environment) ; %let var_list = %str(o&yr.&inst.HE15r o&yr.&inst.HE17r o&yr.&inst.HE16r o&yr.&inst.HE18r); %linsum ; %let var_name = &scoredname.&YR.HOM ; %let var_labl = %str(&scoredname. Y&yr. Home Environment) ; %let var_list = %str(o&yr.&inst.HE12r o&yr.&inst.HE13r o&yr.&inst.HE14r); %linsum ; /* harsh discipline */ %let var_name = &scoredname.&YR.HPD ; %let var_labl = %str(&scoredname. Y&yr. Harsh/Physical Discipline) ; %let var_list = %str(o&yr.&inst.mb1r o&yr.&inst.mb2r o&yr.&inst.mb3r o&yr.&inst.mb4r o&yr.&inst.mb5r); %linsum ; /* parental warmth */ /* drop o&yr.&inst.mb9r from scale */ %let var_name = &scoredname.&YR.PWM ; %let var_labl = %str(&scoredname. Y&yr. Parental Warmth) ; %let var_list = %str(o&yr.&inst.mb6r o&yr.&inst.mb8r o&yr.&inst.mb11r); %linsum ; /*Parent/Child Interaction: Warmth */ /* can drop o&yr.&inst.cb4 to improve alpha slightly */ %let var_name = &scoredname.&YR.CWM; %let var_labl = %str(&scoredname. Y&yr. Child Warmth toward Mother) ; %let var_list = %str(o&yr.&inst.cb3 o&yr.&inst.cb4r o&yr.&inst.cb6); %linsum ; /*Parent/Child Interaction: noncompliance/anger/aggression */ /* drop o&yr.&inst.cb1r */ %let var_name = &scoredname.&YR.CNC; %let var_labl = %str(&scoredname. Y&yr. Child Noncompliance toward Mother) ; %let var_list = %str(o&yr.&inst.cb2r o&yr.&inst.cb5r o&yr.&inst.cb7r); %linsum ; data SASOUT.&scoredname.&yr.; set one; run; %end; %mend; %score; proc sort ; by cohort site tcid; run;