predict.rendo.ivreg: Predict method for fitted Regression Models with Internal...

Description Usage Arguments Value See Also Examples

View source: R/f_s3_rendoivreg.R

Description

Predicted values based on model objects fitted using the instrumental variables regression fitted with IVs generated from the data.

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

REndo documentation built on Sept. 5, 2021, 5:37 p.m.