Skip to contents

print method for class "bkmrfit"

Usage

# S3 method for bkmrfit
print(x, digits = 5, ...)

Arguments

x

an object of class "bkmrfit"

digits

the number of digits to show when printing

...

further arguments passed to or from other methods.

Value

No return value, prints basic summary of fit to console

Examples

## First generate dataset
set.seed(111)
dat <- SimData(n = 50, M = 4)
y <- dat$y
Z <- dat$Z
X <- dat$X

## Fit model with component-wise variable selection
## Using only 100 iterations to make example run quickly
## Typically should use a large number of iterations for inference
set.seed(111)
fitkm <- kmbayes(y = y, Z = Z, X = X, iter = 100, verbose = FALSE, varsel = TRUE)
#> Iteration: 10 (10% completed; 0.00502 secs elapsed)
#> Iteration: 20 (20% completed; 0.01028 secs elapsed)
#> Iteration: 30 (30% completed; 0.01543 secs elapsed)
#> Iteration: 40 (40% completed; 0.02056 secs elapsed)
#> Iteration: 50 (50% completed; 0.02564 secs elapsed)
#> Iteration: 60 (60% completed; 0.03105 secs elapsed)
#> Iteration: 70 (70% completed; 0.03619 secs elapsed)
#> Iteration: 80 (80% completed; 0.04134 secs elapsed)
#> Iteration: 90 (90% completed; 0.0466 secs elapsed)
#> Iteration: 100 (100% completed; 0.0521 secs elapsed)
fitkm
#> Fitted object of class 'bkmrfit'
#> Iterations: 100 
#> Outcome family: gaussian  
#> Model fit on: 2023-12-07 19:00:26