[R] AUC/Volume under the surface

Jeff Newmiller jdnewmil @ending from dcn@d@vi@@c@@u@
Tue Dec 18 08:42:58 CET 2018

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 <r-help using r-project.org> 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. 
>	[[alternative HTML version deleted]]
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

Sent from my phone. Please excuse my brevity.

More information about the R-help mailing list