Function to calculate predictions from a measurement model fitted to an endorsement experiment data.
# S3 method for 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 \mid Z_i, \; \lambda_{j}, \; \omega_{j}) =
\Phi \left( \frac{ Z_i^{T} \lambda_{j} }{ \omega_{j} } \right)
$$
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} \mid Z_i, \; \lambda_{j}) = Z_i^{T} \lambda_{j}.
$$
If the logical standardize
is TRUE
, the predicted mean
of support is standardized by dividing by \(\omega_j\).
A "mcmc"
object for predicted values.
endorse
for model fitting