sas.emmeans: Compute emmeans to mirror SAS emmeans functionality

Description Usage Arguments Author(s) Examples

Description

Compute emmeans to mirror SAS emmeans functionality

Usage

1
2
sas.emmeans(model.obj, specs, data = NULL, mode = "kenward-roger",
  quietly = FALSE, verbose = FALSE, confidence.level = NULL, ...)

Arguments

model.obj

A model object on which to calculate emmeans

specs

specs to be passed to emmeans()

data

specified data to be used for model fitting. (defaults to data bound to model, though this can not always been inferred from the model object and scope of function call)

mode

mode to be passed to emmeans()

quietly

whether to hide message informing of changes to default functionality

verbose

whether all debug information should be printed to console

confidence.level

the confidence interval to use for upper and lower confidence level outputs

...

additional arguments to be passed to emmeans

Author(s)

Doug Kelkhoff kelkhoff.douglas@gene.com, Christina Rabe rabe.christina@gene.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# create model on which to calculate emmeans
# for sake of reusable example lm is used, but can accommodate all models
model <- lm(mpg ~ hp + carb + wt,
  data = mtcars, na.action = na.exclude)

# call emmeans, specifying factors over which means should be calculated
sas.emm <- sas.emmeans(model, ~ carb, data = mtcars, confidence.level = 0.9)

# update the confidence level used
# NOTE: if you're examining confidence intervals, it's much faster to udpate
# rather than re-run the model and means
sas.emm <- update(sas.emm, level = 0.95)

# using the means as a dataframe
as.data.frame(sas.emm)

lengning/gClinBiomarker documentation built on May 9, 2019, 2:55 p.m.