Learn R Programming

circglmbayes (version 1.3.0)

predict.circGLM: Obtain predictions for the circGLM model

Description

Obtain predictions from the original dataset, or the predictions from the fitted model on a new dataset newdata.

Usage

# S3 method for circGLM
predict(object, newdata, ...)

Arguments

object

A circGLM object.

newdata

A data frame with predictors. The predictors must be the same as used in the circGLM object and must have the same column names.

...

Further arguments passed to or from other methods.

Value

A numeric vector with predictions.

Examples

Run this code
# NOT RUN {
dat <- generateCircGLMData()
m   <- circGLM(th ~ ., dat)

# Predictions for the original outcome angles.
predict(m)

# Predictions for new data
dat2  <- generateCircGLMData()
predict(m, newdata = dat2)
# }

Run the code above in your browser using DataLab