predict.endorse | R Documentation |
Function to calculate predictions from a measurement model fitted to an endorsement experiment data.
## S3 method for class 'endorse' predict(object, newdata, type = c("prob.support", "linear.s"), standardize = TRUE, ...)
object |
a fitted object of class inheriting from |
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 |
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. |
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.
A "mcmc"
object for predicted values.
Yuki Shiraito, Department of Political Science, University of Michigan shiraito@umich.edu.
endorse
for model fitting
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.