Oh. Sorry. I'm new to posting in a community. Usually I just google my way to an answer from the SAS website, but this one has been rough. This is what I've done thus far. %MACRO MULTICOLLINEARITY(YVAR,FIELDS,MAX_VIF); ods _all_ close; %put Running with &fields; PROC REG DATA=save.dafinal; MODEL &YVAR = &FIELDS / VIF COLLIN NOINT; ODS OUTPUT PARAMETERESTIMATES=PAREST2; RUN; quit; proc sort data=parest2; by descending varianceinflation; run; data _null_; set parest2(obs=1); if varianceinflation > &max_vif then do; fields_run = tranwrd("&fields",trim(variable),' '); if not missing(fields_run) then do; call_string = cats('%multicollinearity(',"&yvar.,",fields_run,",&max_vif.)"); call execute(call_string); end; end; else do; put "Stopped with Max VIF:" variable "=" varianceinflation; end; run; ods preferences; %MEND MULTICOLLINEARITY; %MULTICOLLINEARITY(yvar=gaaverage, fields=%radius1demovars,MAX_VIF=5)
... View more