Learn R Programming

bfp (version 0.0-48)

getLogMargLik: Extract log marginal likelihood from a model.

Description

Extract log marginal likelihood from a model, saved as the first element of a BayesMfp object.

Usage

getLogMargLik(x, design=getDesignMatrix(x), nObs = nrow(design), dim = ncol(design))

Arguments

x

valid BayesMfp-Object of length 1 (otherwise only first element recognized)

design

(centered) design matrix

nObs

number of observations

dim

number of design matrix columns

Author

Daniel Saban\'es Bov\'e

Details

This function interfaces the C++ function logMargLik, and can be used to compute the marginal likelihood of a model not saved in the model list. But be careful to adjust the saved R^2 of the model, too, and not only the powers! Therefore this function is internal only... and is used e.g. in transformMfp.

See Also

getLogPrior