Skip to contents

Takes a fitted `inlamemi` object produced by `fit_inlamemi` and produces a summary from it.

Usage

# S3 method for inlamemi
summary(object, ...)

# S3 method for summary.inlamemi
print(x, ...)

Arguments

object

model of class `inlamemi`.

...

other arguments

x

object of class summary.inlamemi.

Value

`summary.inlamemi` returns an object of class `summary.inlamemi`, a list of components to print.

Examples

# Fit the model
simple_model <- fit_inlamemi(data = simple_data,
                           formula_moi = y ~ x + z,
                           formula_imp = x ~ z,
                           family_moi = "gaussian",
                           error_type = c("berkson", "classical"),
                           prior.prec.moi = c(10, 9),
                           prior.prec.berkson = c(10, 9),
                           prior.prec.classical = c(10, 9),
                           prior.prec.imp = c(10, 9),
                           prior.beta.error = c(0, 1/1000),
                           initial.prec.moi = 1,
                           initial.prec.berkson = 1,
                           initial.prec.classical = 1,
                           initial.prec.imp = 1)
#> Warning: path[1]="/tmp/RtmpfGZ0tD/file1a294d693a2f": No such file or directory

summary(simple_model)
#> Formula for model of interest: 
#> y ~ x + z
#> 
#> Formula for imputation model: 
#> x ~ z
#> 
#> Error types: 
#> [1] "berkson"   "classical"
#> 
#> Fixed effects for model of interest: 
#>            mean        sd 0.025quant 0.5quant 0.975quant     mode
#> beta.0 1.037233 0.2178900  0.6163623 1.039218   1.442705 1.033686
#> beta.z 1.926489 0.3865504  1.2319446 1.921502   2.573445 1.923057
#> 
#> Coefficient for variable with measurement error and/or missingness: 
#>            mean        sd 0.025quant 0.5quant 0.975quant     mode
#> beta.x 1.973498 0.1996157   1.579061 1.973999   2.365019 1.976077
#> 
#> Fixed effects for imputation model: 
#>               mean         sd 0.025quant 0.5quant 0.975quant     mode
#> alpha.x.0 1.033073 0.05060061  0.9338056 1.033081   1.132298 1.033081
#> alpha.x.z 2.024722 0.05226241  1.9222640 2.024706   2.127275 2.024706
#> 
#> Model hyperparameters (apart from beta.x): 
#>                                      mean        sd 0.025quant  0.5quant
#> Precision for model of interest 1.1295083 0.3585771  0.5652767 1.0827087
#> Precision for x berkson model   1.1243435 0.3401535  0.6008026 1.0762271
#> Precision for x classical model 0.9261130 0.1088443  0.7306479 0.9196877
#> Precision for x imp model       0.9769957 0.1244896  0.7552162 0.9690517
#>                                 0.975quant      mode
#> Precision for model of interest   1.961303 0.9975389
#> Precision for x berkson model     1.926933 0.9861566
#> Precision for x classical model   1.158593 0.9067846
#> Precision for x imp model         1.244549 0.9531505
#>