predict.rendo.ivreg {REndo} | R Documentation |
Predict method for fitted Regression Models with Internal Instrumental Variables
Description
Predicted values based on model objects fitted using the instrumental variables regression fitted with IVs generated from the data.
Usage
## S3 method for class 'rendo.ivreg'
predict(object, newdata, ...)
Arguments
object |
Object of class inheriting from "rendo.ivreg" |
newdata |
An optional data frame without any instrumental variables in which to look for variables with which to predict. If omitted, the fitted values are returned. |
... |
ignored, for consistency with the generic function. |
Value
predict.rendo.ivreg
produces a vector of predictions
See Also
The model fitting functions hetErrorsIV
,
higherMomentsIV
.
Examples
data("dataHetIV")
het <- hetErrorsIV(y~X1+X2+P|P|IIV(X1, X2),
data = dataHetIV)
# returns the fitted values
predict(het)
# using the data used for fitting also for predicting,
# correctly results in fitted values
all.equal(predict(het, dataHetIV), fitted(het)) # TRUE
[Package REndo version 2.4.10 Index]