predict.polywog: Predict method for polywog objects

Description Usage Arguments Value Author(s) See Also

View source: R/predict.polywog.r

Description

Generates fitted values, including bootstrap confidence intervals, for in- and out-of-sample data from a fitted polywog model.

Usage

1
2
3
## S3 method for class 'polywog'
predict(object, newdata, type = c("link", "response"),
  interval = FALSE, level = 0.95, bag = FALSE, na.action = na.pass, ...)

Arguments

object

a fitted model of class "polywog", typically the output of polywog.

newdata

an optional data frame containing observations for which fitted values should be computed. If not specified, fitted values are generated for the data used to fit the model.

type

specifies whether the fitted values should be generated on the link scale (X β) or in terms of the expected value of the response variable. These only differ for binomial family models.

interval

logical: whether to calculate bootstrap confidence intervals for each fitted value.

level

confidence level for the intervals.

bag

logical: whether to use "bootstrap aggregation" to generate the main fitted values (if FALSE, they are calculated from the main model fit).

na.action

a function specifying what to do with observations in newdata containing NAs (default na.pass). See "Details".

...

other arguments, currently ignored.

Value

If interval = TRUE, a matrix containing each fitted value and its confidence interval. Otherwise, a vector containing the fitted values.

Author(s)

Brenton Kenkel and Curtis S. Signorino

See Also

For more user-friendly generation of fitted values, see predVals. To compute marginal effects, see margEff.polywog.


polywog documentation built on May 1, 2019, 9:15 p.m.