elbo {survival.svb}R Documentation

Compute the evidence lower bound (ELBO)

Description

Compute the evidence lower bound (ELBO)

Usage

elbo(Y, delta, X, fit, nrep = 10000, center = TRUE)

Arguments

Y

Failure times.

delta

Censoring indicator, 0: censored, 1: uncensored.

X

Design matrix.

fit

Fit model.

nrep

Number of Monte Carlo samples.

center

Should the design matrix be centered.

Value

Returns a list containing:

mean

The mean of the ELBO.

sd

The standard-deviation of the ELBO.

expected.likelihood

The expectation of the likelihood under the variational posterior.

kl

The KL between the variational posterior and prior.

Details

The evidence lower bound (ELBO) is a popular goodness of fit measure used in variational inference. Under the variational posterior the ELBO is given as

ELBO = E_{\tilde{\Pi}}[\log L_p(\beta; Y, X, \delta)] - KL(\tilde{\Pi} \| \Pi)

where \tilde{\Pi} is the variational posterior, \Pi is the prior, L_p(\beta; Y, X, \delta) is Cox's partial likelihood. Intuitively, within the ELBO we incur a trade-off between how well we fit to the data (through the expectation of the log-partial-likelihood) and how close we are to our prior (in terms of KL divergence). Ideally we want the ELBO to be as small as possible.


[Package survival.svb version 0.0-2 Index]