Learn R Programming

GRaF (version 0.1-12)

plot3d: Surface plots of graf models

Description

plot3d provides basic surface plots to visualise interactions betweens fitted terms in graf models. The predicted probability of presence along two covariates is plotted with other covariates are held either at their average value or near the peak (point of highest probability) of the latent random field. The prior function and credible intervals may also be plotted. 3d plots for factors are not implemented.

Usage

plot3d(object, dims = c(1, 2), resolution = 20, CI = 0.95, prior = TRUE, CIs = TRUE, theta = 30, phi = 30, peak = FALSE, ...)

Arguments

object
A graf object.
dims
A vector of length 2 giving the column numbers of the covariates to plot.
resolution
The resolution of the prediction surface along each covariate.
CI
The level at which to calculate predictive credible intervals. The default value returns upper and lower 95% credible intervals.
prior
Whether to additionally plot the value of the prior function.
CIs
Whether to additionally plot the credible intervals.
theta
Viewing angle for persp, theta gives the azimuthal direction.
phi
Viewing angle for persp, phi gives the colatitude.
peak
Whether to hold other covariates at the value of the training datapoint with the highest probability of presence. If FALSE covariates are held at their mean value in the training data set.
...
Additional arguments to pass to persp.

Value

One or more surface plots of the marginal effect of a pair of predictors on the probability of species presence.

See Also

graf, plot.graf