- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
In PROC LOGISTIC (v.9.4) with SELECTION=STEPWISE, if you ask to output the ROC curve data (OUTROC), you get results for every step. My question: Is there a way to restrict the output to just the final step? Failing that, is there a way that I can use ODS to output the total number of steps so that I can subset the OUTROC dataset? [I suppose I could use proc freq to find the maximum number of steps and then try to pass that maximum number to a DATA step. But that's very kludgy.]
My current code:
proc logistic data=hem;
model outcome(ref='Alive') = IL_1ra IL_6 IL_8 IL_10 Eotaxin IP_10 MCP_1 / outroc=hem selection=stepwise;
output out=outhem predicted=predhem xbeta=xbhem;
run;
Thanks,
Dennis Hanseman
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@oakHILLS68 wrote:
(...) is there a way that I can use ODS to output the total number of steps so that I can subset the OUTROC dataset? [I suppose I could use proc freq to find the maximum number of steps and then try to pass that maximum number to a DATA step. But that's very kludgy.]
Hello @oakHILLS68,
You can do the selection in one DATA step;
data want(drop=_s);
if _n_=1 then set hem(rename=(_step_=_s)) point=n;
set hem nobs=n;
if _step_=_s;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@oakHILLS68 wrote:
(...) is there a way that I can use ODS to output the total number of steps so that I can subset the OUTROC dataset? [I suppose I could use proc freq to find the maximum number of steps and then try to pass that maximum number to a DATA step. But that's very kludgy.]
Hello @oakHILLS68,
You can do the selection in one DATA step;
data want(drop=_s);
if _n_=1 then set hem(rename=(_step_=_s)) point=n;
set hem nobs=n;
if _step_=_s;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content