predprob {pscl}R Documentation

Compute predicted probabilities from fitted models

Description

Compute predicted probabilities from fitted models, optionally at new covariate values

Usage

predprob(obj, ...)

Arguments

obj fitted model object
... other arguments

Details

See documentation for specific methods.

Value

A matrix of predicted probabilities, each row a vector of predicted probabilities over the range of responses seen in the data (i.e., min(y):max(y)), conditional on the values of covariates.

Author(s)

Simon Jackman <jackman@stanford.edu>

See Also

predprob.glm, predprob.zeroinfl

Examples

data(bioChemists)
zip <- zeroinfl(count=art ~ .,
                x = ~ fem + mar + kid5 + phd + ment,
                z = ~ fem + mar + kid5 + phd + ment,
                dist="poisson",        
                data=bioChemists,trace=TRUE) ## zero-infl poisson
phat <- predprob(zip)

newdata <- expand.grid(list(fem="Men",mar="Married",
                            kid5=1,phd=3.103,
                            ment=0:77))
phat <- predprob(zip,newdata=newdata)

[Package pscl version 0.52 Index]