re: Function for setting up random effects (intercepts or...

Description Usage Arguments Examples

View source: R/design_matrices.R

Description

Function for setting up random effects (intercepts or B-spline curves)

Usage

1
2
re(x, id, data, randomCurves = FALSE, width = 5, norder = 4,
  derivOrder = 2)

Arguments

x

vector evaluation points (typically time)

id

character string designating grouping variable

data

dataset in which to evaluate arguments

randomCurves

TRUE/FALSE if True, uses B-spline bases, otherwise random intercepts

width

scalar width of B-spline bases (if randomCurves = TRUE)

norder

scalar order of B-spline bases (order k is degree k-1) (if randomCurves = TRUE)

derivOrder

scalar order of derivative used in the random effect penalty matrix (if randomCurves = TRUE)

Examples

1
2
3
4
5
6
library(psplinesl1)
data(simData)

# setup random effect matrices
rand <- re(x = "x", id = "id", data = simData,
           randomCurves = FALSE)

bdsegal/psplinesl1 documentation built on July 22, 2019, 11:38 a.m.