Learn R Programming

UPG (version 0.3.4)

logLik.UPG.Binomial: Compute log-likelihoods from UPG.Binomial objects

Description

logLik can be used to compute log-likelihoods from UPG.Binomial objects. The log-likelihood is based on the posterior mean of the coefficients.

Usage

# S3 method for UPG.Binomial
logLik(object = NULL, ...)

Value

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

Arguments

object

an object of class UPG.Binomial.

...

other logLik parameters.

Author

Gregor Zens

See Also

summary.UPG.Binomial to summarize a UPG.Binomial object and create tables. plot.UPG.Binomial to plot a UPG.Binomial object. coef.UPG.Binomial to extract coefficients from a UPG.Binomial object.

Examples

Run this code
# \donttest{
# estimate a binomial logit model using example data
library(UPG)
data(titanic)
y  = titanic[,1]
Ni = titanic[,2]
X  = titanic[,-c(1,2)]
results.binomial = UPG(y = y, X = X, Ni = Ni, model = "binomial")

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

# }

Run the code above in your browser using DataLab