Learn R Programming

psycho (version 0.4.91)

get_contrasts: Compute estimated contrasts from models.

Description

Compute estimated contrasts between factor levels based on a fitted model. See the documentation for your model's class:

Usage

get_contrasts(fit, ...)

Arguments

fit

A model.

...

Arguments passed to or from other methods.

Value

Estimated contrasts.

Examples

Run this code
# NOT RUN {
library(psycho)
require(lmerTest)
require(rstanarm)

fit <- lm(Adjusting ~ Birth_Season * Salary, data = affective)
get_contrasts(fit)

fit <- lm(Adjusting ~ Birth_Season * Salary, data = affective)
get_contrasts(fit, adjust = "bonf")

fit <- lmerTest::lmer(Adjusting ~ Birth_Season * Salary + (1 | Salary), data = affective)
get_contrasts(fit, formula = "Birth_Season")

fit <- rstanarm::stan_glm(Adjusting ~ Birth_Season, data = affective)
get_contrasts(fit, formula = "Birth_Season", ROPE_bounds = c(-0.1, 0.1))
# }

Run the code above in your browser using DataLab