set_coef: Internal function to set coefficients

View source: R/set_coef.R

set_coefR Documentation

Internal function to set coefficients

Description

Set the coefficients in a model to different values and return the modified object (internal function)

Usage

set_coef(model, coefs, ...)

## Default S3 method:
set_coef(model, coefs, ...)

## S3 method for class 'polr'
set_coef(model, coefs, ...)

## S3 method for class 'glmmPQL'
set_coef(model, coefs, ...)

## S3 method for class 'afex_aov'
set_coef(model, coefs, ...)

## S3 method for class 'glimML'
set_coef(model, coefs, ...)

## S3 method for class 'betareg'
set_coef(model, coefs, ...)

## S3 method for class 'multinom'
set_coef(model, coefs, ...)

## S3 method for class 'crch'
set_coef(model, coefs, ...)

## S3 method for class 'hxlr'
set_coef(model, coefs, ...)

## S3 method for class 'gamlss'
set_coef(model, coefs, ...)

## S3 method for class 'glmmTMB'
set_coef(model, coefs, ...)

## S3 method for class 'glmx'
set_coef(model, coefs, ...)

## S3 method for class 'merMod'
set_coef(model, coefs, ...)

## S3 method for class 'lmerModLmerTest'
set_coef(model, coefs, ...)

## S3 method for class 'lmerMod'
set_coef(model, coefs, ...)

## S3 method for class 'mlm'
set_coef(model, coefs, ...)

## S3 method for class 'hurdle'
set_coef(model, coefs, ...)

## S3 method for class 'zeroinfl'
set_coef(model, coefs, ...)

## S3 method for class 'rlmerMod'
set_coef(model, coefs, ...)

## S3 method for class 'selection'
set_coef(model, coefs, ...)

## S3 method for class 'scam'
set_coef(model, coefs, ...)

## S3 method for class 'glm'
set_coef(model, coefs, ...)

## S3 method for class 'lm'
set_coef(model, coefs, ...)

Arguments

model

object to modify

coefs

vector of coefficients to insert in the model object

Details

To compute the variance of marginal effects we need to take the Jacobian with

Value

Model object of the same class as the model argument, but with different stored coefficients.


marginaleffects documentation built on Nov. 24, 2022, 1:06 a.m.