BookmarkSubscribeRSS Feed
michellemabelle
Calcite | Level 5

How do I do univariate analysis for variable selection, say p<0.1, to enter into the final multivariate model?

Do I simply run it one by one per variable, and choose? Or is there a way to loop the variables, or to integrate it into proc logistic (eg, stepwise?)

 

 

proc logistic data=outfiles.trial2_miout descending;
	class AGE_above65 SEX BMI_obese ASACLASS_above4 FNSTATUS2 SMOKE HxDYSPNEA HYPERMED STEROID BLEEDDIS HxDIABETES HxCAD HxNEURO HxCHF HxRENALFAIL HxCOPD HxPVD ASCITES DISCANCR WNDINF TRANSFUS;
	model majormorbid=AGE_above65 SEX BMI_obese ASACLASS_above4 FNSTATUS2 SMOKE HxDYSPNEA HYPERMED STEROID BLEEDDIS HxDIABETES HxCAD HxNEURO HxCHF HxRENALFAIL HxCOPD HxPVD ASCITES DISCANCR WNDINF TRANSFUS;
	by _imputation_;
	ods output ParameterEstimates=outfiles.trial2_logistic_parms;
run;

proc mianalyze parms=trial2_logistic_parms;
	class AGE_above65 SEX BMI_obese ASACLASS_above4 FNSTATUS2 SMOKE HxDYSPNEA HYPERMED STEROID BLEEDDIS HxDIABETES HxCAD HxNEURO HxCHF HxRENALFAIL HxCOPD HxPVD ASCITES DISCANCR WNDINF TRANSFUS;
	modeleffects age_above65 sex bmi_obese asaclass_above4 smoke etoh diabetes_n steroid bleeddis cadhx_n neurohx_n neuro_deficit hxchf
	acuterenalfail Fnstatus2 HYPERMED DYSPNEA_n HXCOPD ascites discancr pvd_n wndinf_n transfus_n;
	ods output parameterestimates = trial2_mianalyze_parms;
run;

data outfiles.trial2_ORs;
	set trial2_mianalyze_parms;
	OR=exp(estimate);
	LCL_OR=exp(LCLMean);
	UCL_OR=exp(UCLMean);

proc print;
	var  OR LCL_OR UCL_OR;
run;

  

5 REPLIES 5
michellemabelle
Calcite | Level 5

Thank you! Do I simply run HPGENSELECT one by one per variable, and choose those with p<0.1? Or is there a way to loop the variables, or to integrate it into proc logistic (eg, stepwise?) 

 

I also notice that HPGENSELECT is done through linear regression. My outcome variable is binary, eg. complication or no complication, so I thought logistic would be most appropriate. Regarding the convention for variable selection, I understand I need to run a univariate analysis first - would this be a univariate logistic regression or a univariate linear regression? 

 

Cheers!

Ksharp
Super User

No. You should put all the variables together. PROC HPGENSELECT also can handle logistic model .

Why do you want to do univariate analysis ? you should also consider the interaction effect between them .

michellemabelle
Calcite | Level 5

My supervisor insists that choosing variables to enter into the final multivariate model by doing univariate analysis is the standard in medical research for risk predictors. 

Ksharp
Super User

I think your supervisor want you to do some description statistic , like : max min , outlier 

and if it conform to Normal distribution ?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1042 views
  • 0 likes
  • 2 in conversation