Learn R Programming

GLMMcosinor (version 0.2.0)

predict.cglmm: Predict from a cosinor model

Description

Given a time variable and optional covariates, generate predicted values from a cosinor fit. Default prediction is the mean value, optionally can predict at a given month

Usage

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

Value

Returns predicted values from the cosinor model.

Arguments

object

An object of class cglmm.

newdata

Optional new data.

...

other arguments passed to glmmTMB:::predict.glmmTMB.

Examples

Run this code

fit <- cglmm(vit_d ~ X + amp_acro(time,
  group = "X",
  n_components = 1,
  period = 12
), data = vitamind)
predict(fit)

Run the code above in your browser using DataLab