get_contrasts.stanreg: Compute estimated marginal means and contrasts from stanreg...

Description Usage Arguments Value Author(s) Examples

View source: R/get_contrasts.stanreg.R

Description

Compute estimated marginal means and contrasts from a stanreg models.

Usage

1
2
## S3 method for class 'stanreg'
get_contrasts(fit, formula, prob = 0.9, ...)

Arguments

fit

A stanreg model.

formula

A character vector (formula like format, i.e., including interactions or nesting terms) specifying the names of the predictors over which EMMs are desired.

prob

A numeric scalar in the interval (0,1) giving the target probability content of the intervals. The nominal probability content of the intervals is the multiple of 1/nrow(obj) nearest to prob.

...

Arguments passed to or from other methods.

Value

list with estimated marginal means and contrasts.

Author(s)

Dominique Makowski

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(psycho)
require(rstanarm)
fit <- rstanarm::stan_glm(Adjusting ~ Birth_Season * Sex, data=affective)

contrasts <- get_contrasts(fit, formula="Birth_Season * Sex")
contrasts$means

contrasts <- get_contrasts(fit, formula="Birth_Season")
contrasts$contrasts

## End(Not run)

neuropsychology/psycho.R documentation built on Nov. 17, 2018, 2:14 p.m.