logLik.UPG.Logit {UPG}R Documentation

Compute log-likelihoods from UPG.Logit objects

Description

logLik can be used to compute log-likelihoods from UPG.Logit objects. The log-likelihood is based on the posterior mean of the coefficients and can be used for model selection when combined with,e.g., BIC or other model selection criteria.

Usage

## S3 method for class 'UPG.Logit'
logLik(object = NULL, ...)

Arguments

object

an object of class UPG.Logit.

...

other logLik parameters.

Value

Returns a numeric of class logLik with attributes containing the number of estimated parameters and the number of observations.

Author(s)

Gregor Zens

See Also

summary.UPG.Logit to summarize the estimates of a discrete choice model from an UPG.Logit object and create tables. plot.UPG.Logit to plot the results of a discrete choice model from an UPG.Logit object. coef.UPG.Logit to extract coefficients from an UPG.Logit object.

Examples


# estimate a logit model using example data
library(UPG)
data(lfp)
y = lfp[,1]
X = lfp[,-1]
results.logit = UPG(y = y, X = X, type = "logit", verbose=TRUE)

# extract log-likelihood
ll.logit = logLik(results.logit)

# compute BIC
BIC(ll.logit)


[Package UPG version 0.2.2 Index]