UN: Unstructured Structure

View source: R/structure.R

UNR Documentation

Unstructured Structure

Description

Variance-covariance structure where the residuals have time-specific variance and correlation. Can be stratified on a categorical variable.

Usage

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

Arguments

formula

formula indicating on which variable to stratify the covariance structure.

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 ~1, indicating a time-specific variance parameter and a correlation parameter specific to each pair of times.

Value

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

Examples

UN(NULL, var.cluster = "id", var.time = "time", add.time = TRUE)
UN(~gender, var.cluster = "id", var.time = "time", add.time = TRUE)
UN(gender ~ 1, var.cluster = "id", var.time = "time", add.time = TRUE)
UN(list(~gender,~1), var.cluster = "id", var.time = "time", add.time = TRUE)
UN(list(gender~age,gender~1), var.cluster = "id", var.time = "time", add.time = TRUE)


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