Description Usage Arguments Author(s) Examples
Compute emmeans to mirror SAS emmeans functionality
| 1 2 | 
| 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 | 
Doug Kelkhoff kelkhoff.douglas@gene.com, Christina Rabe rabe.christina@gene.com
| 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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.