ods graphics on; proc logistic data=sample outmodel = model_output plots(only)=roc; model target(event = "1") = var1--var20; weight w; run; ods graphics off;
where w = 1 or 0;
Hello, if I run the above code, I'm hoping I'll fit a model based on the data where my weight variable is 1 and the output statistics will be where my weight variable is 0?
Will the roc plot include all my data or just where w = 1?
Thanks
Any observation that has weight=0 is excluded from the model and is not used in the fitting. If you use an output statement such as
output out=out prob=prob resdev=resdev xbeta=xbeta;
then some statistics (such as PROB and XBETA) will be present for all observations, regardless of the weight value.
However, residuals (such as RESDEV), which depend on having a response value, will have missing values when weight=0 because those responses are not part of the data that were used to fit the model.
The ROC curve is composed of the points for which weight is NOT zero. You can use the OUTROC= option on the MODEL statement to see the points used in the ROC curve.
Any observation that has weight=0 is excluded from the model and is not used in the fitting. If you use an output statement such as
output out=out prob=prob resdev=resdev xbeta=xbeta;
then some statistics (such as PROB and XBETA) will be present for all observations, regardless of the weight value.
However, residuals (such as RESDEV), which depend on having a response value, will have missing values when weight=0 because those responses are not part of the data that were used to fit the model.
The ROC curve is composed of the points for which weight is NOT zero. You can use the OUTROC= option on the MODEL statement to see the points used in the ROC curve.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.