Dear R-helpers,
I tried to create a 3D surface showing the interaction between two
continuous explanatory variables; the response variable is binary (0/1).
The model is:
model-glm(incidence~sun*trees,binomial)
then I used wireframe to create a 3D plot:
I tried to create a 3D surface showing the interaction between two
continuous explanatory variables; the response variable is
binary (0/1).
The model is:
model-glm(incidence~sun*trees,binomial)
then I used wireframe to create a 3D plot:
[EMAIL PROTECTED] wrote:
Dear R-helpers,
I tried to create a 3D surface showing the interaction between two
continuous explanatory variables; the response variable is binary (0/1).
The model is:
model-glm(incidence~sun*trees,binomial)
then I used wireframe to create a 3D plot:
library(Design)
d - datadist(mydata); options(datadist='d')
f - lrm(incidence ~ sun*trees) # lrm is for binary or ordinal response
plot(f, sun=NA, trees=NA)
# add method='image' or 'contour' to get other types of graphs
plot(f, sun=NA, trees=NA, fun='plogis') # probability scale
Correction: