View source: R/f_s3_rendoivreg.R
| predict.rendo.ivreg | R Documentation | 
Predicted values based on model objects fitted using the instrumental variables regression fitted with IVs generated from the data.
## S3 method for class 'rendo.ivreg'
predict(object, newdata, ...)
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.  | 
predict.rendo.ivreg produces a vector of predictions
The model fitting functions hetErrorsIV,
higherMomentsIV.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.