get.means.ci.cosinor: Get means and confidence interval for MESOR, Amplitude,...

get.means.ci.cosinorR Documentation

Get means and confidence interval for MESOR, Amplitude, Acrophase

Description

The function will takes in a fitted merMod object, transform the linear/raw coefficients to COSINOR non-linear/transformed coefficients for MESOR, Amplitude and acrophase and estimated the standard error through bootstrapping to provide the confidence interval.

Usage

get.means.ci.cosinor(
  fit,
  contrast.frm,
  nsim = 500,
  parallel = "multicore",
  ncpus = 8,
  conftype = "perc",
  conflevel = 0.95,
  ...
)

Arguments

fit

the object from lmer() function

contrast.frm

a string formula specifying the names of the predictors over which emmeans are desired.

nsim

the number of simulations, positive integer; the bootstrap B (or R) for bootMer function.Default is 500.

parallel

the type of parallel operation to be used (if any) for bootMer function. The default is "multicore".

ncpus

integer: number of processes to be used in parallel operation: typically one would choose this to be the number of available CPUs.Default is 8.

conftype

A character string representing the type of interval required.The value must be one of "norm", "basic","perc".

conflevel

The confidence level required, default is 0.95.

...

additional argument(s) for methods.

Examples


f<-fit.cosinor.mixed(y="hrv", x="gender", random="1|participant_id", data=db.model)
summary(f)
get.means.ci.cosinor(fit=f, contrast.mean.frm="~gender")


maytesuarezfarinas/cosinoRmixedeffects documentation built on Oct. 30, 2024, 9:31 p.m.