getFixedEffects: Extract fixed effects of a supported model

View source: R/compatibility.R

getFixedEffectsR Documentation

Extract fixed effects of a supported model

Description

A wrapper to extract fixed effects of a supported model.

Usage

getFixedEffects(object, ...)

## Default S3 method:
getFixedEffects(object, ...)

## S3 method for class 'MixMod'
getFixedEffects(object, ...)

## S3 method for class 'brmsfit'
getFixedEffects(object, ...)

Arguments

object

a fitted model.

...

additional parameters.

Note

Note that for brms models, the mean is used as the measure of central tendency for the fixed effects as in brms::fixef.

See Also

getObservedResponse, getSimulations, getRefit, getFitted

Examples

testData = createData(sampleSize = 400, family = gaussian())

fittedModel <- lm(observedResponse ~ Environment1 , data = testData)

# response that was used to fit the model
getObservedResponse(fittedModel)

# predictions of the model for these points
getFitted(fittedModel)

# predictions on the scale of the observed response
# (differs from getFitted only for k/n binomial models)
getFittedResponse(fittedModel)

# extract simulations from the model as matrix
getSimulations(fittedModel, nsim = 2)

# extract simulations from the model for refit (often requires different structure)
x = getSimulations(fittedModel, nsim = 2, type = "refit")

getRefit(fittedModel, x[[1]])

getRefit(fittedModel, getObservedResponse(fittedModel))

# get data frame that was used to fit the model
getData(fittedModel)

DHARMa documentation built on Nov. 7, 2026, 5:08 p.m.