Load libraries

SAS Program

LIBNAME file "/home/u62185526/ILE Project";
run;

data NSCH2324; /*Combined datasets*/;
set file.nsch_2023e_topical file.nsch_2023e_screener file.nsch_2024e_topical file.nsch_2024e_screener; /*Indiviudal datasets*/; 
fwc2yr=fwc/2;/*Adjusted weight -average annual weight-, dividing by # years*/
if stratum='2A' then stratum='2'; 
hhidnum = input(hhid,8.);
fipsstnum = input(fipsst,8.);
stratumnum = input(stratum,8.);
run;

/**FORMATTING**/
proc format;
 value Race_fmt
1 = "White,  Hispanic" 
2 = "White, NH" 
3 = "Black, NH"
4 = "Asian, NH"
5 = "Other/Multi-racial, NH"
6 = "Other/Multi-racial, NH";
value MHCare_fmt
1 = "Yes, received mental health care"
2 = "No, but needed to see a mental health professional"
3 = "No, and did not need to see a mental health professional";
value Sex_fmt 
1 = "Male" 
2 = "Female";  
value Age_fmt 
96= "0-2 years old"
1 = "3-7 years old"
2 = "8-12 years old"
3 = "13-17 years old";
value PrntNativity_fmt  
1 = "Any parent born outside of the US (1st and 2nd generation HH)" 
2 = "All parents born in the US (3rd or higher generation HH)" 
3 = "Other (child born in United States, parents are not listed)";
value AdultEduc_fmt  
1 = "Less than High School"
2 = "High School & More: some college or technical school" 
3 = "College degree or higher";
value InsGap_fmt /*InsGap_23*/ 
1 = "Consistently insured throughout the past year" 
2 = "Currently uninsured or had periods without coverage";
value HHLanguage_fmt /*HHLanguage_2324*/ 
1 = "English" 
2 = "Other than English"; 
value PA_fmt /*WIC_23 CashAss_23 FoodStamp_23 MealFree_23 EBTCards_23*/ 
1 = "Yes" 
2 = "No";
value EmploymentSt_fmt/*EmploymentSt_2324*/ 
1 = "At least one caregiver employed" 
2 = "Caregiver(s) unemployed/working without pay/retired"; 
value SSI_fmt 
1 = "Yes" 
2 = "No" 
.M = "Missing";
value Housing_fmt/*Housing_2324*/ 
1 = "Yes" 
2 = "No"; 
value FPL_fmt
1= "0-99% FPL"
2= "100-199% FPL"
3= "200-399% FPL"
4= "400%+ FPL";
run;
 
/*****RACE Ethnicity*****/
data NSCH2324_ILE;
   set NSCH2324;
   Race_2324 = SC_Race_R;
   format Race_2324 Race_fmt.; 
if SC_HISPANIC_R = 1 then race_2324 = 1;
else if SC_HISPANIC_R = 2 and SC_RACE_R = 1 then Race_2324 = 2; 
else if SC_HISPANIC_R = 2 and SC_RACE_R = 2 then Race_2324 = 3; 
else if SC_HISPANIC_R = 2 and SC_RACE_R = 4 then Race_2324 = 4; 
else if SC_HISPANIC_R = 2 and SC_RACE_R in (3,5,7) then Race_2324 = 4;
else if SC_HISPANIC_R = 1 and SC_RACE_R in (2,3,4,5,7) then Race_2324 = 5;
label Race_2324 = "Race and ethnicity of child"; 
run;

/*****ASIAN as Study POP*****/
data NSCH2324_Asian_ILE;
   set NSCH2324_ILE;
    if Race_2324 in (4);
   run;

/*Outcome*/ 
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_ILE;  
   MHCare_2324 = K4Q22_R;
   if MHCare_2324 in (1,2);
   format MHCare_2324 MHCare_fmt.;
   label MHCare_2324 = "Mental Health Professional Services Utilization, 2 categories"; 

/*****Independent Variables*****/
/******SEX*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    Sex_2324 = SC_SEX; 
    format Sex_2324 Sex_fmt.;
label Sex_2324 = "Sex of child"; 
run;

/******AGE*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
  Age_2324 = SC_AGE_YEARS;
   format Age_2324 Age_fmt.; 
if 0 <= SC_AGE_YEARS <= 2 then Age_2324 = 999;
else if 3 <= SC_AGE_YEARS <= 7 then Age_2324 = 1;
else if 8<= SC_AGE_YEARS <=12 then Age_2324 = 2;
else if 13<= SC_AGE_YEARS <=17 then Age_2324 = 3;
if Age_2324 in (1,2,3);
label Age_2324 = "Age of child";
run;

/******Parent Nativity*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    PrntNativity_2324 = HOUSE_GEN;
    format PrntNativity_2324 PrntNativity_fmt.;
if HOUSE_GEN in (1,2) then PrntNativity_2324 = 1; 
else if HOUSE_GEN = 3 then PrntNativity_2324 = 2; 
else if HOUSE_GEN = 4 then PrntNativity_2324 = 3;  
if PrntNativity_2324 in (1,2,3);
label PrntNativity_2324 = "Generational status of the parents"; 
run;
   
/******Education*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    AdultEduc_2324 = HIGRADE_TVIS;
    format AdultEduc_2324 AdultEduc_fmt.;  
if HIGRADE_TVIS =1 then AdultEduc_2324 = 1; 
else if HIGRADE_TVIS in(2,3) then AdultEduc_2324 = 2; 
else if HIGRADE_TVIS = 4 then AdultEduc_2324 = 3;  
if AdultEduc_2324 in (1,2,3);
label AdultEduc_2324 = "Parents' highest education level"; 
run;

/******Insurance*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    InsGap_2324 = INSGAP ;
    format InsGap_2324 InsGap_fmt.;  
InsGap_2324 = .; 
if INSGAP = 1 then InsGap_2324 = 1; 
else if INSGAP in (2,3) then InsGap_2324 = 2;
if InsGap_2324 in (1,2);
label InsGap_2324 = "Children insurance status past 12 months";
run;

 /******Household Language*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    HHLanguage_2324 = HHLanguage;
    format HHLanguage_2324 HHLanguage_fmt.;  
if HHLANGUAGE = 1 then HHLanguage_2324 = 1; 
else if HHLANGUAGE in (2,3) then HHLanguage_2324 = 2; 
if HHLanguage_2324 in (1,2);
label HHLanguage_2324 = "Primary language in the household"; 
run;

 /******Employment*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    EmploymentSt_2324 = A1_EMPLOYED_R;
    format EmploymentSt_2324 EmploymentSt_fmt.;  
if A1_EMPLOYED_R in (3,4,5,6) or A2_EMPLOYED_R in (3,4,5,6) then EmploymentSt_2324 = 2; 
else if A1_EMPLOYED_R in (1,2) or A2_EMPLOYED_R in (1,2) then EmploymentSt_2324 = 1; 
if EmploymentSt_2324 in (1,2);
label EmploymentSt_2324 = "Parents' employment status"; 
run;

/******Child SSI*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    SSI_2324 = SSI;
    format SSI_2324 SSI_fmt.; 
if SSI = .M and SSIDISABILITY = 1 then SSI_2324 = 1;
if SSI_2324 in (1,2);
label SSI_2324 = "Child who receive SSI";
run;

 /******Housing*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
    Housing_2324 = K10Q22;
    format Housing_2324 Housing_fmt.;  

if K10Q22= 1 then Housing_2324 = 1; 
else if K10Q22 in (2) then Housing_2324 = 2; 
if Housing_2324 in (1,2);
label Housing_2324 = "Neighborhood Housing Conditions"; 
run;

 /******Poverty Level*****/
data NSCH2324_Asian_MH;
   set NSCH2324_Asian_MH; 
format FPL_2324 FPL_fmt.; 
FPL_2324 = .; 
if 0 <= FPL_I1 <= 99 then FPL_2324 = 1; 
if 100 <= FPL_I1 <= 199 then FPL_2324= 2; 
if 200 <= FPL_I1 <= 399 then FPL_2324 = 3; 
if 400 <= FPL_I1 then FPL_2324 = 4; 
label FPL_2324 = "Family poverty level status, 1imputation";
run;


/****UNIVARIATE ANALYSIS****/
proc surveyfreq data= NSCH2324_Asian_MH;
strata stratumnum fipsstnum;
  cluster hhidnum;
  weight fwc2yr;
tables 
MHCare_2324 
Sex_2324 
Age_2324 
PrntNativity_2324 
AdultEduc_2324 
InsGap_2324 
HHLanguage_2324 
EmploymentSt_2324 
SSI_2324 
FPL_2324 
Housing_2324/ row cl;
run;

/****BIVARIATE ANALYSIS****/
proc surveyfreq data=NSCH2324_Asian_MH;
    strata stratum fipsstnum;
    cluster hhidnum;
    weight fwc2yr;
    
    tables MHCare_2324 * Race_2324 / chisq;
    tables MHCare_2324 * Sex_2324 / chisq;
    tables MHCare_2324 * Age_2324 / chisq;
    tables MHCare_2324 * PrntNativity_2324 / chisq;
    tables MHCare_2324 * AdultEduc_2324 / chisq;
    tables MHCare_2324 * InsGap_2324 / chisq;
    tables MHCare_2324 * HHLanguage_2324 / chisq;
    tables MHCare_2324 * EmploymentSt_2324 / chisq;
    tables MHCare_2324 * SSI_2324/ chisq;
    tables MHCare_2324 * Housing_2324 / chisq;
    tables MHCare_2324 * FPL_2324 / chisq;
    tables  HHLanguage_2324 * PrntNativity_2324 / chisq;
run;

/**** 1. Regression Model ****/
proc surveylogistic data=NSCH2324_Asian_MH;
    strata stratumnum fipsstnum;
    cluster hhidnum;
    weight fwc2yr;
    
    class 
        Sex_2324 (ref="Male")
        Age_2324 (ref="13-17 years old")
        PrntNativity_2324 (ref="All parents born in the US (3rd or higher generation HH)") 
        AdultEduc_2324 (ref="College degree or higher")
        InsGap_2324 (ref="Consistently insured throughout the past year")
        HHLanguage_2324 (ref="English")
        EmploymentSt_2324 (ref="At least one caregiver employed")
        SSI_2324 (ref="No")
        Housing_2324 (ref="No")
        FPL_2324 (ref="400%+ FPL")
        / param=ref;

    model MHCare_2324(event="Yes, received mental health care") = 
        Sex_2324 Age_2324 PrntNativity_2324 AdultEduc_2324 InsGap_2324 
        HHLanguage_2324 EmploymentSt_2324 SSI_2324 Housing_2324 FPL_2324/clparm ;
output out=pred_probs p=Predict lower=LCL upper=UCL;
run;


/**** Checking collinerity ****/
proc corr data=NSCH2324_Asian_MH;
    var MHCare_2324
        Sex_2324 
        Age_2324 
        PrntNativity_2324 
        AdultEduc_2324
        InsGap_2324 
        HHLanguage_2324 
        EmploymentSt_2324 
        SSI_2324 
        Housing_2324
        FPL_2324;
run;


/**** 2. Regression Model House Gen STRATIFY ****/
proc surveylogistic data=NSCH2324_Asian_MH;
    strata stratumnum fipsstnum;
    cluster hhidnum;
    weight fwc2yr;
    domain PrntNativity_2324;
     class
        Sex_2324 (ref="Male")
        Age_2324 (ref="13-17 years old")
        InsGap_2324 (ref="Consistently insured throughout the past year")
        AdultEduc_2324 (ref="College degree or higher")
        HHLanguage_2324 (ref="English")
        EmploymentSt_2324 (ref="At least one caregiver employed")
        SSI_2324 (ref="No")
        Housing_2324(ref="No")
        FPL_2324 (ref="400%+ FPL")
        / param=ref;

    model MHCare_2324(event="Yes, received mental health care") = 
        Sex_2324 
        Age_2324 
        InsGap_2324
        AdultEduc_2324
        HHLanguage_2324 
        EmploymentSt_2324 
        SSI_2324 
        Housing_2324
        FPL_2324;
run;


/**** 3. Regression Model AGE STRATIFY ****/
proc surveylogistic data=NSCH2324_Asian_MH;
    strata stratumnum fipsstnum;
    cluster hhidnum;
    weight fwc2yr;
    domain Age_2324;
     class
        Sex_2324 (ref="Male")
        PrntNativity_2324 (ref="All parents born in the US (3rd or higher generation HH)") 
        AdultEduc_2324 (ref="College degree or higher")
        InsGap_2324 (ref="Consistently insured throughout the past year")
        HHLanguage_2324 (ref="English")
        EmploymentSt_2324 (ref="At least one caregiver employed")
        SSI_2324 (ref="No")
        Housing_2324(ref="No")
        FPL_2324 (ref="400%+ FPL")
        / param=ref;

    model MHCare_2324(event="Yes, received mental health care") = 
        Sex_2324 
        PrntNativity_2324
        AdultEduc_2324
        InsGap_2324 
        HHLanguage_2324 
        EmploymentSt_2324 
        SSI_2324 
        Housing_2324
        FPL_2324;
run;


  
/*****SENSITIVITY ANALYSIS*****/
/*Outcome*/ 
data NSCH2324_Asian_MHAll;
   set  NSCH2324_Asian_ILE;
   if K4Q22_R = 1 then MHCare_w2324= 1; 
   else MHCare_w2324 = 0; /*Included 'did not need') */
   format MHCare_w2324 MHCare_fmt.;
   label MHCare_w2324 = "Mental Health Professional Services Utilization, 2 categories"; 
RUN;

/*****Independent Variables*****/
/******SEX*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    Sex_2324 = SC_SEX; 
    format Sex_2324 Sex_fmt.;
label Sex_2324 = "Sex of child"; 
run;

/******AGE*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
  Age_2324 = SC_AGE_YEARS;
   format Age_2324 Age_fmt.; 
if 0 <= SC_AGE_YEARS <= 2 then Age_2324 = 96;
else if 3 <= SC_AGE_YEARS <= 7 then Age_2324 = 1;
else if 8<= SC_AGE_YEARS <=12 then Age_2324 = 2;
else if 13<= SC_AGE_YEARS <=17 then Age_2324 = 3;
if Age_2324 in (1,2,3);
label Age_2324 = "Age of child";
run;

/******Parent Nativity*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    PrntNativity_2324 = HOUSE_GEN;
    format PrntNativity_2324 PrntNativity_fmt.;
if HOUSE_GEN in (1,2) then PrntNativity_2324 = 1; 
else if HOUSE_GEN = 3 then PrntNativity_2324 = 2; 
else if HOUSE_GEN = 4 then PrntNativity_2324 = 3;  
if PrntNativity_2324 in (1,2,3);
label PrntNativity_2324 = "Generational status of the parents"; 
run;
   
/******Education*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    AdultEduc_2324 = HIGRADE_TVIS;
    format AdultEduc_2324 AdultEduc_fmt.;  
if HIGRADE_TVIS =1 then AdultEduc_2324 = 1; 
else if HIGRADE_TVIS in(2,3) then AdultEduc_2324 = 2; 
else if HIGRADE_TVIS = 4 then AdultEduc_2324 = 3;  
if AdultEduc_2324 in (1,2,3);
label AdultEduc_2324 = "Parents' highest education level"; 
run;

/******Insurance*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    InsGap_2324 = INSGAP ;
    format InsGap_2324 InsGap_fmt.;  
InsGap_2324 = .; 
if INSGAP = 1 then InsGap_2324 = 1; 
else if INSGAP in (2,3) then InsGap_2324 = 2;
if InsGap_2324 in (1,2);
label InsGap_2324 = "Children insurance status past 12 months";
run;

 /******Household Language*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    HHLanguage_2324 = HHLanguage;
    format HHLanguage_2324 HHLanguage_fmt.;  

if HHLANGUAGE = 1 then HHLanguage_2324 = 1; 
else if HHLANGUAGE in (2,3) then HHLanguage_2324 = 2; 
if HHLanguage_2324 in (1,2);
label HHLanguage_2324 = "Primary language in the household"; 
run;

 /******Employment*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    EmploymentSt_2324 = A1_EMPLOYED_R;
    format EmploymentSt_2324 EmploymentSt_fmt.;  
if A1_EMPLOYED_R in (3,4,5,6) or A2_EMPLOYED_R in (3,4,5,6) then EmploymentSt_2324 = 2; 
else if A1_EMPLOYED_R in (1,2) or A2_EMPLOYED_R in (1,2) then EmploymentSt_2324 = 1; 
if EmploymentSt_2324 in (1,2);
label EmploymentSt_2324 = "Parent's Employment Status"; 
run;

/******Child SSI*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    SSI_2324 = SSI;
    format SSI_2324 SSI_fmt.; 
if SSI = .M and SSIDISABILITY = 1 then SSI_2324 = 1;
if SSI_2324 in (1,2);
label SSI_2324 = "Child who receive SSI";
run;

 /******Housing*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
    Housing_2324 = K10Q22;
    format Housing_2324 Housing_fmt.;  

if K10Q22= 1 then Housing_2324 = 1; 
else if K10Q22 in (2) then Housing_2324 = 2; 
if Housing_2324 in (1,2);
label Housing_2324 = "Housing"; 
run;
 /******Poverty Level*****/
data NSCH2324_Asian_MHAll;
   set NSCH2324_Asian_MHAll; 
format FPL_2324 FPL_fmt.; 
FPL_2324 = .; 
if 0 <= FPL_I1 <= 99 then FPL_2324 = 1; 
if 100 <= FPL_I1 <= 199 then FPL_2324= 2; 
if 200 <= FPL_I1 <= 399 then FPL_2324 = 3; 
if 400 <= FPL_I1 then FPL_2324 = 4; 
label FPL_2324 = "Family poverty level status, 1imputation";
run;


/**** 5. Regression Model Sensivity Analysis ****/
proc surveylogistic data=NSCH2324_Asian_MHALL;
    strata stratumnum fipsstnum;
    cluster hhidnum;
    weight fwc2yr;

    class
        Sex_2324 (ref="Male")
        Age_2324 (ref="13-17 years old")
        PrntNativity_2324 (ref="All parents born in the US (3rd or higher generation HH)") 
        AdultEduc_2324 (ref="College degree or higher")
        InsGap_2324 (ref="Consistently insured throughout the past year")
        HHLanguage_2324 (ref="English")
        EmploymentSt_2324 (ref="At least one caregiver employed")
        SSI_2324 (ref="No")
        Housing_2324(ref="Yes")
        FPL_2324 (ref="400%+ FPL")
        / param=ref;

    model MHCare_w2324 (event = "Yes, received mental health care") =
        Sex_2324 
        Age_2324 
        PrntNativity_2324 
        AdultEduc_2324
        InsGap_2324 
        HHLanguage_2324 
        EmploymentSt_2324 
        SSI_2324 
        Housing_2324
        FPL_2324;
run;