Skip to contents

Summary method for glmMixBayes models

Usage

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

Arguments

object

An object of class glmMixBayes.

...

Not used.

Value

An object of class "summary.glmMixBayes", which is printed with a custom method.

Examples

# \donttest{
data(lifem)

# lifem data preprocessing
# For computational efficiency in the example, we work with a subset of the lifem data.
lifem <- lifem[order(-(lifem$commf + lifem$comml)), ]
lifem_small <- rbind(
  head(subset(lifem, hndlnk == 1), 100),
  head(subset(lifem, hndlnk == 0), 20)
)

x <- cbind(1, poly(lifem_small$unit_yob, 3, raw = TRUE))
y <- lifem_small$age_at_death

adj <- adjMixBayes(
  linked.data = lifem_small,
  priors = list(theta = "beta(2, 2)")
)

fit <- plglm(
  age_at_death ~ poly(unit_yob, 3, raw = TRUE),
  family = "gaussian",
  adjustment = adj,
  control = list(
    iterations = 200,
    burnin.iterations = 100,
    seed = 123
  )
)
#> 
#> SAMPLING FOR MODEL 'glmMixBayes_gaussian' NOW (CHAIN 1).
#> Chain 1: 
#> Chain 1: Gradient evaluation took 5.2e-05 seconds
#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.52 seconds.
#> Chain 1: Adjust your expectations accordingly!
#> Chain 1: 
#> Chain 1: 
#> Chain 1: WARNING: There aren't enough warmup iterations to fit the
#> Chain 1:          three stages of adaptation as currently configured.
#> Chain 1:          Reducing each adaptation stage to 15%/75%/10% of
#> Chain 1:          the given number of warmup iterations:
#> Chain 1:            init_buffer = 15
#> Chain 1:            adapt_window = 75
#> Chain 1:            term_buffer = 10
#> Chain 1: 
#> Chain 1: Iteration:   1 / 200 [  0%]  (Warmup)
#> Chain 1: Iteration:  20 / 200 [ 10%]  (Warmup)
#> Chain 1: Iteration:  40 / 200 [ 20%]  (Warmup)
#> Chain 1: Iteration:  60 / 200 [ 30%]  (Warmup)
#> Chain 1: Iteration:  80 / 200 [ 40%]  (Warmup)
#> Chain 1: Iteration: 100 / 200 [ 50%]  (Warmup)
#> Chain 1: Iteration: 101 / 200 [ 50%]  (Sampling)
#> Chain 1: Iteration: 120 / 200 [ 60%]  (Sampling)
#> Chain 1: Iteration: 140 / 200 [ 70%]  (Sampling)
#> Chain 1: Iteration: 160 / 200 [ 80%]  (Sampling)
#> Chain 1: Iteration: 180 / 200 [ 90%]  (Sampling)
#> Chain 1: Iteration: 200 / 200 [100%]  (Sampling)
#> Chain 1: 
#> Chain 1:  Elapsed Time: 0.768 seconds (Warm-up)
#> Chain 1:                0.92 seconds (Sampling)
#> Chain 1:                1.688 seconds (Total)
#> Chain 1: 
#> Warning: The largest R-hat is NA, indicating chains have not mixed.
#> Running the chains for more iterations may help. See
#> https://mc-stan.org/misc/warnings.html#r-hat
#> Warning: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
#> Running the chains for more iterations may help. See
#> https://mc-stan.org/misc/warnings.html#bulk-ess
#> Warning: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
#> Running the chains for more iterations may help. See
#> https://mc-stan.org/misc/warnings.html#tail-ess
#> 
#>     ......................................................................................
#>     . Method                         Time (sec)           Status                         . 
#>     ......................................................................................
#>     . ECR-ITERATIVE-1                0.079                Converged (2 iterations)       . 
#>     ......................................................................................
#> 
#>     Relabelling all methods according to method ECR-ITERATIVE-1 ... done!
#>     Retrieve the 1 permutation arrays by typing:
#>         [...]$permutations$"ECR-ITERATIVE-1"
#>     Retrieve the 1 best clusterings: [...]$clusters
#>     Retrieve the 1 CPU times: [...]$timings
#>     Retrieve the 1 X 1 similarity matrix: [...]$similarity
#>     Label switching finished. Total time: 0.1 seconds. 

summary(fit)
#> Call:
#> plglm(formula = age_at_death ~ poly(unit_yob, 3, raw = TRUE), 
#>     family = "gaussian", adjustment = adj, control = list(iterations = 200, 
#>         burnin.iterations = 100, seed = 123))
#>  
#> Family:
#> gaussian
#>  
#> (Component 1 = Correct-match):
#> Outcome Model Coefficients:
#>                                Estimates Std. Error   2.5 % 97.5 %
#> (Intercept)                      55.7967     3.6257 49.5028  62.42
#> poly(unit_yob, 3, raw = TRUE)1    7.1598     4.4356 -0.9492  16.40
#> poly(unit_yob, 3, raw = TRUE)2    8.1611     4.0579 -0.7745  15.26
#> poly(unit_yob, 3, raw = TRUE)3    9.1663     4.5267  1.1864  17.96
#>  
#> Dispersion:
#>   Estimate  Std. Error
#>   199.9      70.5     
#> 
#> (Component 2 = Incorrect-match):
#> Outcome Model Coefficients:
#>                                Estimates Std. Error    2.5 % 97.5 %
#> (Intercept)                      29.0588    14.3733  -1.3359 44.579
#> poly(unit_yob, 3, raw = TRUE)1   -0.4999     4.2417  -9.1588  7.196
#> poly(unit_yob, 3, raw = TRUE)2   -1.0870     5.1031 -10.9310  8.499
#> poly(unit_yob, 3, raw = TRUE)3   -2.7743     4.9410 -11.6794  7.240
#>  
#> Dispersion:
#>   Estimate  Std. Error
#>   156.4      91.1     
#> 
# }