Learn R Programming

LMMstar (version 1.1.0)

UN: 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)

Value

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

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab