Skip to contents

Most model objects are proper R model objects. There are, however, some model objects that store the proper object internally (e.g. mice models). This function extracts that model object in those cases.

Usage

model_get_model(model)

# Default S3 method
model_get_model(model)

# S3 method for class 'mira'
model_get_model(model)

Arguments

model

(a model object, e.g. glm)
A model object.

Examples

lm(hp ~ mpg + factor(cyl), mtcars) |>
  model_get_model()
#> 
#> Call:
#> lm(formula = hp ~ mpg + factor(cyl), data = mtcars)
#> 
#> Coefficients:
#>  (Intercept)           mpg  factor(cyl)6  factor(cyl)8  
#>      171.349        -3.327        16.623        88.105  
#>