Learn R Programming

FBMS (version 1.1)

logistic.loglik.ala: Log likelihood function for logistic regression with an approximate Laplace approximations used This function is created as an example of how to create an estimator that is used to calculate the marginal likelihood of a model.

Description

Log likelihood function for logistic regression with an approximate Laplace approximations used This function is created as an example of how to create an estimator that is used to calculate the marginal likelihood of a model.

Usage

logistic.loglik.ala(y, x, model, complex, params = list(r = exp(-0.5)))

Value

A list with the log marginal likelihood combined with the log prior (crit) and the posterior mode of the coefficients (coefs).

Arguments

y

A vector containing the dependent variable

x

The matrix containing the precalculated features

model

The model to estimate as a logical vector

complex

A list of complexity measures for the features

params

A list of parameters for the log likelihood, supplied by the user

Examples

Run this code
logistic.loglik.ala(as.integer(rnorm(100) > 0), matrix(rnorm(100)), TRUE, list(oc = 1))


Run the code above in your browser using DataLab