AUC/Volume under the surface

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

AUC/Volume under the surface

R help mailing list-2
Dear Members,I am having trouble in plotting a 3D ROC curve based on multinomial logistic regression. I am also interested in finding AUC/Volume under the surface based on final multivariate model. I do have an interaction term in my final model. 
I tried using "HUM" library. But I failed to figure out how to include interaction term in the model. 
Looking forward for any help. Appreciate your help in advance. 
Regards,rehena
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: AUC/Volume under the surface

Jeff Newmiller
You need to grasp two concepts:

1) Models in R conventionally have predict methods. To plot your model, predict the dependent variable based on the model object and a grid of your independent variable(s). Whether you have interactions or logistic regression shouldn't be relevant to getting a plot. The "expand.grid" function is helpful with preparing your inputs for the predict method.

2) Surfaces generally need a regular grid of input values independent of the input values you built your model from. This grid is often input to the plotting functions with the set of unique x-values and the set of unique y-values, with your z-values in a matrix. That is, for most 3d surface plotting functions you do not provide the gridded x and y values that you gave to the predict function.

There are many functions that can do this plotting... the rgl package is quite nice, but the scatterplot3d package can be simpler to publish with. Search for tutorials... there are many. If you get stuck, post a reproducible example data set and what you did with it here and someone will likely offer some more specific assistance.


On December 17, 2018 7:20:58 PM PST, Rehena Sultana via R-help <[hidden email]> wrote:

>Dear Members,I am having trouble in plotting a 3D ROC curve based on
>multinomial logistic regression. I am also interested in finding
>AUC/Volume under the surface based on final multivariate model. I do
>have an interaction term in my final model. 
>I tried using "HUM" library. But I failed to figure out how to include
>interaction term in the model. 
>Looking forward for any help. Appreciate your help in advance. 
>Regards,rehena
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.