Predict the response values for a set of covariates based on a model fitted using a model fitting function plmm or wplmm.
Usage
## S3 method for class 'plmm'
predict(object, newdata, data, cond = TRUE, ...)
## S3 method for class 'wplmm'
predict(object, newdata, data, cond = TRUE, ...)
Arguments
object
a model fitted with plmm or wplmm.
newdata
a data frame containing sets of values of the covariates. The clustering variable may be omitted, in which case only unconditional prediction is possible. If newdata is omitted, the response of the original data set is predicted conditionally or unconditionally according to cond.
data
an optional data frame containing the variables used to fit the model. If relevant variables are not found in data, the variables are taken from the environment from which predict was called.
cond
logical. If TRUE, the response is predicted conditional on the random effect prediction for the cluster the observational unit belongs to. If FALSE, an unconditional prediction of the response, i.e. the sum of only the fixed components is computed.
...
other arguments.
Value
Predicted conditional or unconditional response values.