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, ...)

## Arguments

object A fitted model object returned by one of the rstap modeling functions. See stapreg-objects. 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 newsubjdata is provided and any variables were transformed (e.g. rescaled) in the data used to fit the model, then these variables must also be transformed in newsubjdata. Also see the Note section below for a note about using the newsubjdata argument with with binomial models. 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 newsubjdata is specified and an offset was specified when fitting the model. Currently ignored.

## Value

A $$S$$ by $$N$$ matrix, where $$S$$ is the size of the posterior sample and $$N$$ is the number of data points.