Learn R Programming

rstanemax (version 0.1.9)

log_lik: Calculate log-likelihoods from posterior samples. Data can be either original data used for model fit or new data.

Description

See rstantools::log_lik for more details.

Usage

log_lik(object, ...)

# S3 method for stanemax log_lik(object, newdata = NULL, ...)

# S3 method for stanemaxbin log_lik(object, newdata = NULL, ...)

Value

\(S\) by \(N\) matrix of log-likelihoods, where each row corresponds to a draw from the posterior distribution and each column corresponds to a data point.

Arguments

object

A stanemax or stanemaxbin object

...

Currently unused arguments

newdata

New data used for prediction. If NULL, original data is used.