predict.UPG.Logit {UPG}R Documentation

Predicted probabilities from UPG.Logit objects

Description

predict generates predicted probabilities from a UPG.Logit 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.Logit'
predict(object = NULL, ..., newdata = NULL, q = c(0.025, 0.975))

Arguments

object

an object of class UPG.Logit.

...

other predict parameters.

newdata

a matrix or a data.frame containing new explanatory data. The number of columns and the variable ordering must be the same as in the explanatory data used for estimation to generate valid predictions. If no new data is provided, predict will return predicted probabilities for the data used for estimating the model.

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.Logit to summarize a UPG.Logit object and create tables. plot.UPG.Logit to plot a UPG.Logit object. coef.UPG.Logit to extract coefficients from a UPG.Logit object.

Examples


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

# extract predicted probabilities
predict(results.logit)


[Package UPG version 0.3.4 Index]