Programming the statistical procedures from SAS

Proc Surveylogistic - determining best model with between interaction and main effects models?

Reply
Learner
Posts: 1

Proc Surveylogistic - determining best model with between interaction and main effects models?

[ Edited ]

Hi! I’m looking for help with PROC SURVEYLOGISTIC in SAS 94. How do I determine whether an interaction model and a main effects model has superior fit? 

 

I am examining two different outcome: one set of models for “no prenatal care” (Model Ia and Ib) and another set of models for “early prenatal care” (Model IIa and IIb). I'm interested in whether an interaction between early recognition of pregnancy and pregnancy intention exists. For both sets of models, the Schwarz Criterion and the -2LogL values were smaller for the interaction model, suggesting superior interaction model fit. However, the interaction term was significant in the “Early Prenatal Care” model, but not in the “No Prenatal Care” model.  Do I decide between the interaction model & the main effects model based on the Schwarz Criterion/-2Log L? Or Based on the whether the interaction term is significant? 

 

If I were using PROC LOGISTIC, I would  add "scale=none aggregate" and "details lackfit" to the model term to get the Deviance & Pearson Goodness-of-Fit statistics, the Residual Chi-Square Test, and the Hosmer & Oemeshow Goodness-of-fit (based on Ch8 of Stokes, Davis & Koch "Categorical Data Analysis Using SAS"). However, when I added these after PROC SURVEYLOGISTIC, I got errors. Should I include commands in my code to generate other statistics which tell me which model fit is better?

 

 

 

/* MODEL Ia: MAIN EFFECTS MODEL FOR NO PRENATAL CARE */
Proc surveylogistic data=pregnancy3;
stratum SEST;
cluster SECU;
weight WGT2013_2015;
class EARLYLEARN(REF='1') int(ref='1') ed(ref='3') Hispanic(ref='2')
race(ref='2') rmarital(ref='1') firstpreg(REF='1') povertylevel(ref='1')
agecat(ref='1') insurance(ref='1')/ param=ref;
Model NOPRENATAL = EARLYLEARN INT race hispanic povertylevel
rmarital ed firstpreg agecat insurance / rsquare;
contrast 'EL=1, int 2 vs 1' int 1 0 0/estimate=exp;
contrast 'EL=1, int 3 vs 1' int 0 1 0/estimate=exp;
contrast 'EL=1, int 4 vs 1' int 0 0 1/estimate=exp;
Run;

 

 

/* MODEL Ib: INTERACTION MODEL FOR NO PRENATAL CARE) */
 
Proc surveylogistic data=pregnancy3;
stratum SEST;
cluster SECU;
weight WGT2013_2015;
class EARLYLEARN(REF='1') int(ref='1') ed(ref='3') Hispanic(ref='2')
race(ref='2') rmarital(ref='1') firstpreg(REF='1') povertylevel(ref='1')
agecat(ref='1') insurance(ref='1')/ param=ref;
Model NOPRENATAL = EARLYLEARN|INT race hispanic povertylevel
rmarital ed firstpreg agecat insurance / rsquare;
contrast 'int=1, EL 0 vs 1' earlylearn 1/estimate=exp;
contrast 'EL=1, int 2 vs 1' int 1 0 0/estimate=exp;
contrast 'EL=1, int 3 vs 1' int 0 1 0/estimate=exp;
contrast 'EL=1, int 4 vs 1' int 0 0 1/estimate=exp;
contrast 'EL=0, int 2 vs 1' int 1 0 0 earlylearn*int 1 0 0/estimate=exp;
contrast 'EL=0, int 3 vs 1' int 0 1 0 earlylearn*int 0 1 0/estimate=exp;
contrast 'EL=0, int 4 vs 1' int 0 0 1 earlylearn*int 0 0 1/estimate=exp;
Run;

 

/*Model IIa: MAIN EFFECTS MODEL FOR EARLY PRENATAL CARE */
Proc surveylogistic data=pregnancy3;
stratum SEST;
cluster SECU;
weight WGT2013_2015;
class EARLYLEARN(REF='1') int(ref='1') ed(ref='3') Hispanic(ref='2')
race(ref='2') rmarital(ref='1') firstpreg(REF='1') povertylevel(ref='1')
agecat(ref='1') insurance(ref='1')/ param=ref;
Model EARLYPRENATAL = EARLYLEARN INT race hispanic povertylevel
rmarital ed firstpreg agecat insurance;
contrast 'int=1, EL 0 vs 1' earlylearn 1/estimate=exp;
contrast 'EL=1, int 2 vs 1' int 1 0 0/estimate=exp;
contrast 'EL=1, int 3 vs 1' int 0 1 0/estimate=exp;
contrast 'EL=1, int 4 vs 1' int 0 0 1/estimate=exp;
Run;

 

 

/* MODEL IIb: Interaction model for LATER PRENATAL CARE */
Proc surveylogistic data=pregnancy3;
stratum SEST;
cluster SECU;
weight WGT2013_2015;
class EARLYLEARN(REF='1') int(ref='1') ed(ref='3') Hispanic(ref='2')
race(ref='2') rmarital(ref='1') firstpreg(REF='1') povertylevel(ref='1')
agecat(ref='1') insurance(ref='1')/ param=ref;
Model EARLYPRENATAL = EARLYLEARN|INT race hispanic povertylevel
rmarital ed firstpreg agecat insurance;
contrast 'int=1, EL 0 vs 1' earlylearn 1/estimate=exp;
contrast 'EL=1, int 2 vs 1' int 1 0 0/estimate=exp;
contrast 'EL=1, int 3 vs 1' int 0 1 0/estimate=exp;
contrast 'EL=1, int 4 vs 1' int 0 0 1/estimate=exp;
contrast 'EL=0, int 2 vs 1' int 1 0 0 earlylearn*int 1 0 0/estimate=exp;
contrast 'EL=0, int 3 vs 1' int 0 1 0 earlylearn*int 0 1 0/estimate=exp;
contrast 'EL=0, int 4 vs 1' int 0 0 1 earlylearn*int 0 0 1/estimate=exp;
Run;
 

 

 

I really appreciate any help, because I’ve searched through the archives without finding an answer & I find the SAS documentation not entirely clarifying (ie https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_surveylogis...).

 

Thank you very much!

Ask a Question
Discussion stats
  • 0 replies
  • 107 views
  • 0 likes
  • 1 in conversation