predict.graf: Predictions for 'graf' objects.

Description Usage Arguments Value See Also

View source: R/predict.graf.R

Description

Predictions and associated credible intervals for graf objects, either for the data used for fitting or for a different dataset.

Usage

1
2
3
## S3 method for class 'graf'
predict(object, newdata = NULL, type = c("response", "latent"), CI = 0.95,
			maxn = NULL, ...)

Arguments

object

A graf object.

newdata

An optional dataframe giving covariates to predict to. If NULL a prediction for the covariates used to fit the model is returned.

type

The level of the prediction. "response" (default) gives predictions on the probability scale and "latent" gives predictions on the scale of the latent Gaussian.

CI

The level at which to calculate predictive credible intervals. The default value returns upper and lower 95% credible intervals. If credible intervals are not required this can be set to NULL. If type = 'latent' setting CI = 'std' returns the mean and standard deviation of the latent field.

maxn

The maximum number of records to predict to in each batch. To avoid computationally expensive operations on large matrices, predict.graf splits the dataset for prediction into batches with maximum number of records maxn. This can be adjusted by the user to optimise computational efficiency on different machines. If maxn = NULL maxn is set at approximately one tenth the number rows used to fit the model.

...

Additional arguments for future versions.

Value

A matrix of posterior modes and optionally credible intervals.

See Also

graf


GRaF documentation built on May 29, 2017, 9:50 a.m.