Learn R Programming

SPQR (version 0.1.0)

summary.SPQR: summary method for class SPQR

Description

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

Usage

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab