The function computes the average the log-likelihood, log-posterior, the deviance
information criterion and estimated degrees of freedom from samples of, e.g., a
samplestats(samples, x = NULL, y = NULL, family = NULL, logLik = FALSE, ...)
An object of class
"bamlss" which contains MCMC
x list as returned by function
The model response, as returned by function
Logical, should the log-likelihood be computed, may take some time!
Currently not used.
If the log-likelihood is not available in the samples, the function tries to compute
the information. Depending on the complexity of the model, this may take some time.
Computations are based on the
$loglik() function of the
bamlss.family object contains a function
which computes the log-likelihood from parameters, these functions are used for computation.
A list with the following entries (if available):
The average log-likelihood.
The average log-posterior.
The deviance information criterion.
The estimated degrees of freedom.
if (FALSE) ## Generate some data. d <- GAMart() ## Estimate model without sampling statistics b <- bamlss(num ~ s(x1) + s(x2) + s(x3) + te(lon,lat), data = d, samplestats = FALSE) #> Error in bamlss.model.frame(formula, data, family, weights, subset, offset, na.action, specials, contrasts): object 'd' not found ## Note: needs the $d() or $loglik() function in the family! names(family(b)) #> Error in family(b): object 'b' not found ## Compute sampling statistics. samplestats(b) #> Error in samplestats(b): object 'b' not found