12-18-2012 01:47 PM
In the excel attached, For the 1st tab - 'Step 1" I have figured out the code via external assistanceto get the desired output but what I don't get is the way to run the logistic proc on the original data set to get the desired output as shown in the 2nd tab of the excel attached. ( exactly same format and columns). The proc logistic will include only those independent variables which have a mean > 0.02
proc summary data=Experiment ;
output out=means (drop=_type_ _freq_);
proc transpose data=means out=vertical;
proc sql ;
select _name_ into :varlist separated by ' '
where mean > 0.02
PROC LOGISTIC DATA=?? descending;
MODEL detractor = ?? ;
12-18-2012 03:16 PM
proc logistic won't give that to you by default. You'll need to manipulate the files it does provide yourself.
Actually, its just a sort, but if you can write the logistic code then someone can help with obtaining the output.
Do you know the logistic code to write?
12-18-2012 11:01 PM
Well, since I will be writing the code for 'proc log' for the first time, I may not be sure about the accuracy but I will try out Tom's suggestion and see how it works. My ultimate aim is to achieve a 'data set' through 'proc log' output as given below.:
|Binary Variables||Coeff||SE||WS||Sig||Odds Ratio|
12-18-2012 06:55 PM
I assume that the first ?? should be replaced with Experiment since that is the dataset you used in the previous step.
The second ?? you would want to replace with &VARLIST so that the list of variables you calculated in the first step is used.
You might need to add code to the SQL query to eliminate your dependent variable from VARLIST.
As to making the output look at the manual for PROC LOGISITIC and see what output datasets it can make. You can also look turn on ODS trace to see which of the printed outputs can be directed to datasets.