Skip to contents

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

Usage

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

# S3 method for class '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)

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.033885 0.2182911  0.6118263 1.034314   1.445395 1.028072
#> beta.z 1.919817 0.3871734  1.2196917 1.910930   2.583442 1.915278
#> 
#> Coefficient for variable with measurement error and/or missingness: 
#>            mean        sd 0.025quant 0.5quant 0.975quant     mode
#> beta.x 1.974594 0.1954074   1.587021 1.975579   2.356408 1.979692
#> 
#> Fixed effects for imputation model: 
#>               mean         sd 0.025quant 0.5quant 0.975quant     mode
#> alpha.x.0 1.033074 0.05060181  0.9338043 1.033082   1.132301 1.033082
#> alpha.x.z 2.024720 0.05226362  1.9222595 2.024704   2.127275 2.024704
#> 
#> Model hyperparameters (apart from beta.x): 
#>                                      mean        sd 0.025quant  0.5quant
#> Precision for model of interest 1.1293529 0.3537397  0.5732360 1.0830362
#> Precision for x berkson model   1.1239105 0.3317552  0.6078515 1.0786884
#> Precision for x classical model 0.9257665 0.1069530  0.7336495 0.9194670
#> Precision for x imp model       0.9770666 0.1230084  0.7572519 0.9694457
#>                                 0.975quant      mode
#> Precision for model of interest   1.950959 0.9985215
#> Precision for x berkson model     1.901843 0.9940753
#> Precision for x classical model   1.154183 0.9066419
#> Precision for x imp model         1.240776 0.9544314
#>