predict.UPG.Binomial {UPG} | R Documentation |
Predicted probabilities from UPG.Binomial objects
Description
predict
generates predicted probabilities from a UPG.Binomial
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.
Usage
## S3 method for class 'UPG.Binomial'
predict(object = NULL, ..., newdata = NULL, q = c(0.025, 0.975))
Arguments
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. |
Value
Returns a list containing posterior means of predicted probabilities as well as the desired credible interval.
Author(s)
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
# 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 predicted probabilities
predict(results.binomial)