coef.UPG.MNL: Extract coefficients from UPG.MNL objects

View source: R/COEF.R

coef.UPG.MNLR Documentation

Extract coefficients from UPG.MNL objects

Description

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

Usage

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

Arguments

object

an object of class UPG.MNL.

...

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 list containing posterior means and the desired credible interval.

Author(s)

Gregor Zens

See Also

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

Examples


# estimate a multinomial logit model using example data
library(UPG)
data(program)
y = program[,1]
X = program[,-1]
results.mnl = UPG(y = y, X = X, model = "mnl")

# extract posterior means and credible interval based on 0.025 and 0.975 quantiles
coef(results.mnl, q = c(0.025, 0.975))


UPG documentation built on Nov. 4, 2023, 5:06 p.m.