For models fit using MCMC, the
log_lik method returns the
\(S\) by \(N\) pointwise log-likelihood matrix, where \(S\) is the size
of the posterior sample and \(N\) is the number of data points.
# S3 method for stapreg log_lik(object, newsubjdata = NULL, newdistdata = NULL, newtimedata = NULL, offset = NULL, ...)
A fitted model object returned by one of the
rstap modeling functions. See
Optionally, a data frame of the subject-specific data
in which to look for variables with which to predict.
If omitted, the original datasets are used. If
If newsubjdata is provided a data frame of the subject-distance must also be given for models with a spatial component - can be the same as original distance_dataframe
If newsubjdata is provided, a data frame of the subject-time data must also be given for models with a temporal component
A vector of offsets. Only required if
A \(S\) by \(N\) matrix, where \(S\) is the size of the posterior sample and \(N\) is the number of data points.