predict.endorse: Predict Method for the Measurement Model of Political Support

View source: R/endorse.R

predict.endorseR Documentation

Predict Method for the Measurement Model of Political Support

Description

Function to calculate predictions from a measurement model fitted to an endorsement experiment data.

Usage

## S3 method for class 'endorse'
predict(object, newdata, type = c("prob.support",
"linear.s"), standardize = TRUE, ...)

Arguments

object

a fitted object of class inheriting from "endorse"

newdata

an optional data frame containing data that will be used to make predictions from. If omitted, the data used to fit the regression are used.

type

the type of prediction required. The default is on the scale of the predicted probability of positive support; the alternative "linear.s" is on the scale of s_{ijk}.

standardize

logical switch indicating if the predicted values on the scale of s_{ijk} are standardized so that its variance is one.

...

further arguments to be passed to or from other methods.

Details

predict.endorse produces predicted support for political actors from a fitted "endorse" object. If newdata is omitted the predictions are based on the date used for the fit. Setting type specifies the type of predictions. The default is "prob.support", in which case the function computes the average predicted probability of positive support:

P(s_ijk > 0 | Z_i, λ_j, ω_j) = Φ( Z_i^T λ_j / ω_j )

for each political group k. If type is set to be "linear.s", the output is the predicted mean of support parameters:

E(s_ijk | Z_i, λ_j) = Z_i^T λ_j.

If the logical standardize is TRUE, the predicted mean of support is standardized by dividing by ω_j.

Value

A "mcmc" object for predicted values.

Author(s)

Yuki Shiraito, Department of Political Science, University of Michigan shiraito@umich.edu.

See Also

endorse for model fitting


endorse documentation built on May 2, 2022, 9:07 a.m.