Learn R Programming

marginaleffects (version 0.3.3)

set_coef: Internal function to set coefficients

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

Description

Internal function to set coefficients

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

Usage

set_coef(model, coefs)

# S3 method for default set_coef(model, coefs)

# S3 method for polr set_coef(model, coefs)

# S3 method for glmmPQL set_coef(model, coefs)

# S3 method for glimML set_coef(model, coefs)

# S3 method for betareg set_coef(model, coefs)

# S3 method for multinom set_coef(model, coefs)

# S3 method for crch set_coef(model, coefs)

# S3 method for hlxr set_coef(model, coefs)

# S3 method for glmx set_coef(model, coefs)

# S3 method for hurdle set_coef(model, coefs)

# S3 method for zeroinfl set_coef(model, coefs)

# S3 method for rlmerMod set_coef(model, coefs)

# S3 method for scam set_coef(model, coefs)

# S3 method for glm set_coef(model, coefs)

# S3 method for lm set_coef(model, coefs)

Arguments

model

object to modify

coefs

vector of coefficients to insert in the model object

Value

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

Details

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