lmmaovTMB: Fit Models with TMB

View source: R/lmmaovTMB.R

lmmaovTMBR Documentation

Fit Models with TMB

Description

Fit a linear mixed model using TMB including r-side covariance structures using containment Anova degrees of freedom tests.

Usage

lmmaovTMB(
  data,
  fixed,
  random,
  repeated = NULL,
  units = NULL,
  rcov = "vc",
  type = 3,
  REML = TRUE,
  control = glmmTMBControl(optimizer = optim, optArgs = list(method = "BFGS"))
)

Arguments

data

a data.frame containing columns of variables.

fixed

a two-sided linear formula object describing the fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right,

random

a one-sided formula describing the random effects

repeated

the variable name in the data.frame representing the repeated measure

units

the variable name in the data.frame

rcov

the R-side variance/covariance matrix diag (diagonal, heterogeneous variance) ar1 (autoregressive order-1, homogeneous variance) cs (compound symmetric, heterogeneous variance) ou (* Ornstein-Uhlenbeck, homogeneous variance) exp (* exponential autocorrelation) gau (* Gaussian autocorrelation) mat (* Matérn process correlation) toep (* Toeplitz) Structures marked with * are experimental/untested. See vignette("covstruct", package = "glmmTMB")< for more information.

type

type of test, "II", "III", 2, or 3. Roman numerals are equivalent to the corresponding Arabic numerals.

REML

whether to use REML estimation rather than maximum likelihood.

control

parameters, see glmmTMBControl.

Examples

data(heart)
heart<-allFactors(heart, vars=c("drug","time","patient"))
(m1<-lmmaovTMB(data=heart, fixed=HR~drug*time+basehr, random=~patient:drug, repeated="time", units="patient", rcov="ar1"))

jprice80/lmmaov documentation built on Sept. 6, 2024, 11:54 a.m.