I've googled lots papers on the subject but don't seem to find what I want. I'm a beginner at SAS Macro, hoping to get some help here. Here is what I want:
I have a dataset with 1200 variables. I want a macro to run those 1199 variables as OUTCOME, and store the P-values of logistic regression in a dataset. Also the dependent variable "gender" is character, and so are the outcome variables. But I don't know how to put class statement in the macro. Here is an example of how I run it as a single procedure.
proc logistic data=Baseline_gender ;
class gender(ref="Male") / param=ref;
model N284(event='1')=gender ;
ods output ParameterEstimates=ok;
run;
My idea was to create ODS output and delete the unnecessary variables other than the P-value and merge them into one dataset according to the OUTCOME variable names in the model: e.g.
Variable P-value
A1 0.005
A2 0.018
.. ....
I tried to play with some proc macro but I just cant get it work!!! I really need help on this, Thank you very much.
selection=forward maxstep=1 details
on the model statement you can get an ODS output table (EffectNotInModel
) comparing the chi-squared tests for each of the individual variables. You can then pass all your variables in one model statement using variable lists. – SRSwift