coef.UPG.Binomial {UPG}R Documentation

Extract coefficients from UPG.Binomial objects

Description

coef can be used to extract posterior means and credible intervals based on posterior quantiles from UPG.Binomial objects.

Usage

## S3 method for class 'UPG.Binomial'
coef(object, ..., q = c(0.025, 0.975))

Arguments

object

an object of class UPG.Binomial.

...

other coef parameters.

q

a numerical vector of length two providing the posterior quantiles to be extracted. Default are 0.025 and 0.975 quantiles.

Value

Returns a matrix containing posterior means and the desired credible interval.

Author(s)

Gregor Zens

See Also

summary.UPG.Binomial to summarize a UPG.Binomial object and create tables. predict.UPG.Binomial to predict probabilities using a UPG.Binomial object. plot.UPG.Binomial to plot a UPG.Binomial object.

Examples


# 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 posterior means and credible interval based on 0.025 and 0.975 quantiles
coef(results.binomial, q = c(0.025, 0.975))


[Package UPG version 0.3.4 Index]