Extract log marginal likelihood for a pvEBayes object
Source:R/pvEBayes_object_S3_methods.R
logLik.pvEBayes.RdThis function defines the S3 logLik method for objects of class
pvEBayes. It extracts the log marginal likelihood from a fitted
model.
Usage
# S3 method for class 'pvEBayes'
logLik(object, ...)Arguments
- object
a
pvEBayesobject, which is the output of the function pvEBayes or pvEBayes_tune.- ...
other input parameters. Currently unused.
Examples
fit <- pvEBayes(
contin_table = statin2025_44, model = "general-gamma",
alpha = 0.3, n_posterior_draws = NULL
)
#> ℹ Fitting general-gamma model...
#> ✔ Fitting general-gamma model... [216ms]
#>
#> Object of class 'pvEBayes'
#>
#> General-gamma model with hyperparameter alpha = 0.3.
#> Estimated prior is a mixture of 18 gamma distributions.
#>
#> Running time of the general-gamma model fitting: 0.2239 seconds.
#> Optimizer convergence: successful.
#> No posterior draws were generated.
#>
#> Extract estimated prior parameters, discovered signals
#> and signal strength posterior draws using `summary()`.
logLik(fit)
#> [1] -1845.437