Skip to contents

summarizes the output produced by SPQR() and structures them in a more organized way to be examined by the user.

Usage

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

Arguments

object

An object of class SPQR.

...

Other arguments.

Value

An object of class summary.SPQR. A list containing summary information of the fitted model.

method

The estimation method

time

The elapsed time

prior

If method = "MAP" or method = "MCMC", the hyperprior model for the variance hyperparameters

model

If method = "MLE" or method = "MAP", the fitted torch model. If method = "MCMC", the posterior samples of neural network parameters

loss

If method = "MLE" or method = "MAP", the train and validation loss

optim.info

If method = "MLE" or method = "MAP", configuration information of the Adam routine

elpd

If method = "MCMC", the expected log-predictive density

diagnostics

If method = "MCMC", diagnostic information of the MCMC chain

Examples

# \donttest{
set.seed(919)
n <- 200
X <- rbinom(n, 1, 0.5)
Y <- rnorm(n, X, 0.8)
control <- list(iter = 200, warmup = 150, thin = 1)
fit <- SPQR(X = X, Y = Y, method = "MCMC", control = control,
            normalize = TRUE, verbose = FALSE)

## summarize output
summary(fit)
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> Warning: The ESS has been capped to avoid unstable estimates.
#> 
#> SPQR fitted using MCMC approach with ARD prior🚀
#> 
#> MCMC diagnostics:
#>   Final acceptance ratio is 0.90 and target is 0.9
#> 
#> Expected log pointwise predictive density (elpd) estimates:
#>   elpd.LOO = 90.65508,  elpd.WAIC = 90.01237
#> 
#> Elapsed time: 0.04 minutes
# }