View source: R/circGLMClassFunctions.R
predict_function.circGLM | R Documentation |
This functions creates and returns a new prediction function
that
takes in new data, and returns their predicted values. The prediction
function is based on the posterior estimates.
predict_function.circGLM(object, linkfun = function(x) atanLF(x, 2))
object |
A |
linkfun |
A link function to use in the analysis. Should be the same as the link function. |
A function that takes newdata
as an argument, which must be a
data frame with predictors. The predictors must be the same as used in the
circGLM
object and must have the same column names.
dat <- generateCircGLMData() m <- circGLM(th ~ ., dat) predfun <- predict_function.circGLM(m) newd <- generateCircGLMData() # Predicted values of the new data. predfun(newd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.