About the vertical axis:
The plotmo
function calls predict
internally to generate the graph. So the vertical
axis will be plotted in whatever units predict
returns for your model.
In your example for a randomForest
model, the default prediction type is
"response"
(see the help page for
predict.randomForest
). Change this by passing type="prob"
to plotmo, which plotmo will pass on internally to predict.randomForest
.
For example (see the two graphs on the left):
library(rpart.plot); data(ptitanic) # for ptitanic data
dat <- ptitanic[,c("survived", "sex", "pclass")] # classic example
library(randomForest)
mod <- randomForest(survived~., data=dat)
plotmo(mod) # default predict type is "response"
plotmo(mod, type="prob")

About the horizontal axes:
Since the persp
function accepts only numeric
(not factor) arguments , plotmo converts factor variables to numeric
before invoking persp
internally. Thus a factor of say "blue",
"green", "red"
will be plotted as 1,2,3
in plotmo's persp
plot
(1,2,3
are the integers used internally by R to represent the
factor).
Axis labels:
Get more information on the axes by invoking persp
with ticktype="detailed"
. To do this, pass
persp.ticktype="detailed"
to plotmo (any plotmo argument prefixed
by persp.
gets passed on internally to the persp
function, this is described near the bottom of
the plotmo help page).
For example (see the two graphs on the right):
plotmo(mod, type="prob", persp.ticktype="detailed")
plotmo(mod, type="prob", persp.ticktype="detailed", persp.nticks=3)
Bear in mind that plotmo does automatic determination of the
response axis range. See the ylim
argument of plotmo and Section 5.4 of the
vignette for the plotmo package.
This automatic determination can sometimes cause surprising results.
To plot partial dependence graphs, don't forget that we need to pass type="partdep"
to plotmo. See Chapters 1 and 9 of the
plotmo vignette.