get_lmer_linfct: Return a matrix of linear contrasts, intended for use in...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/get_lmer_linfct.R

Description

Takes an lmerMod object from lme4::lmer() assuming a particular model formula type, then finds a contrast matrix to query the slope estimates. The most written is 'y ~ group + group:x + ( 1 + x | ID )'.

Usage

1
2
3
4
5
6
7
8
get_lmer_linfct(
  lmer_obj,
  contrast = c("Identity", "Dunnett", "Tukey", "Sequen", "custom"),
  grpnames = NULL,
  reference_Dunnett = NULL,
  slope_ind_char = ":x",
  custom_contrast = NULL
)

Arguments

lmer_obj

an lmerMod object returned from lme4::lmer().

contrast

character string specifying which type of contrast is desired.

grpnames

character vector with names of levels for group factor.

reference_Dunnett

character string with exact match to an element of grpnames. The exact match will be the reference group in Dunnett contrasts.

slope_ind_char

character string indicating how to discern slope parameters from "names(fixef(lmer_obj))".

custom_contrast

numeric matrix of contrasts for slope estimates. Column names must match exact with treatment group names. If it is not NULL, it overrides whatever is specified in "contrast".

Value

a contrast matrix.

Author(s)

Bill Forrest forrest@gene.com

See Also

data.frame

Examples

1
 cat('No working example for unexported function get_lmer_linfct().')

wfforrest/maeve documentation built on Jan. 1, 2021, 12:47 p.m.