games (version 1.0-5)

predict.game: Predicted probabilities for strategic models

Description

Makes predicted probabilities from a strategic model.

Usage

## S3 method for class 'game':
predict(object, ...)

## S3 method for class 'egame12': predict(object, newdata, type=c("outcome", "action"), na.action = na.pass, ...) ## S3 method for class 'egame122': predict(object, newdata, type=c("outcome", "action"), na.action = na.pass, ...) ## S3 method for class 'egame123': predict(object, newdata, type=c("outcome", "action"), na.action = na.pass, ...) ## S3 method for class 'ultimatum': predict(object, newdata, na.action = na.pass, ...)

Arguments

object
a fitted model of class game.
newdata
data frame of values to make the predicted probabilities for. If this is left empty, the original dataset is used.
type
whether to provide probabilities for outcomes (e.g., L, RL, or RR in egame12) or for actions (e.g., whether 2 moves L or R given that 1 moved R).
na.action
how to deal with NAs in newdata
...
other arguments, currently ignored.

Value

  • A data frame of predicted probabilities.

Details

This method uses a fitted strategic model to make predictions for a new set of data. Useful for cross-validating or for graphical analysis.

For many uses, such as analyzing the marginal effect of a particular independent variable, the function predProbs will be more convenient.

See Also

predProbs provides a more full-featured and user-friendly wrapper, including plots and confidence bands.