predict.UPG.MNL | R Documentation |
predict
generates predicted probabilities from a UPG.MNL
object. In addition, credible intervals for these probabilities are computed. Probabilities can be predicted from the data used for estimating the model or for a new data set with the same structure.
## S3 method for class 'UPG.MNL'
predict(object = NULL, ..., newdata = NULL, q = c(0.025, 0.975))
object |
an object of class |
... |
other predict parameters. |
newdata |
a matrix or a |
q |
a numerical vector of length two providing the posterior quantiles to be extracted. Default are 0.025 and 0.975 quantiles. |
Returns a list containing posterior means of predicted probabilities as well as the desired credible interval.
Gregor Zens
summary.UPG.MNL
to summarize a UPG.MNL
object and create tables.
plot.UPG.MNL
to plot a UPG.MNL
object.
coef.UPG.MNL
to extract coefficients from a UPG.MNL
object.
# 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 predicted probabilities
predict(results.mnl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.