Learn R Programming

cosinor (version 1.2.3)

test_cosinor: Test for differences in a cosinor model

Description

Given a time variable and optional covariates, generate inference a cosinor fit. For the covariate named (or vector of covariates), this function performs a Wald test comparing the group with covariates equal to 1 to the group with covariates equal to 0. This may not be the desired result for continuous covariates.

Usage

test_cosinor(object, x_str, param = "amp")

Arguments

object

An object of class cosinor.lm

x_str

Character naming the covariate whose amplitude/acrophase will be tested

param

Character string naming the parameter to test, either "amp" for amplitude or "acr" for acrophase

Examples

Run this code

fit <- cosinor.lm(Y ~ time(time) + X + amp.acro(X), data = vitamind)
test_cosinor(fit, "X", "amp")

Run the code above in your browser using DataLab