IND: Independence Structure

View source: R/structure.R

INDR Documentation

Independence Structure

Description

Variance-covariance structure where the residuals are independent but may have different variance. Can be stratified on a categorical variable.

Usage

IND(formula, var.cluster, var.time, add.time)

Arguments

formula

formula indicating variables influencing the residual variance, using either as a multiplicative factor (right hand side) or stratification (left hand side) to model their effect.

var.cluster

[character] cluster variable.

var.time

[character] time variable.

add.time

Should the default formula (i.e. when NULL) contain a time effect.

Details

A typical formula would be either ~1 indicating constant variance or ~time indicating a time dependent variance.

Value

An object of class IND that can be passed to the argument structure of the lmm function.

Examples

IND(NULL, var.cluster = "id", var.time = "time", add.time = TRUE)
IND(~1, var.cluster = "id", var.time = "time")
IND(gender~1, var.cluster = "id", var.time = "time")
IND(gender~time, var.cluster = "id", var.time = "time")
IND(~gender+time, var.cluster = "id", var.time = "time")


LMMstar documentation built on Nov. 9, 2023, 1:06 a.m.