predict.rendo.latent.IV {REndo}R Documentation

Predict method for Models using the Latent Instrumental Variables approach

Description

Predicted values based on linear models estimated using the latent instrumental variables approach for a single endogenous regressor.

Usage

## S3 method for class 'rendo.latent.IV'
predict(object, newdata, ...)

Arguments

object

Object of class inheriting from "rendo.latent.IV"

newdata

An optional data frame 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.latent.IV produces a vector of predictions

See Also

The model fitting function latentIV

Examples

data("dataLatentIV")

lat  <- latentIV(y ~ P, data = dataLatentIV)

# returns the fitted values
predict(lat)

# using the data used for fitting also for predicting,
# correctly results in fitted values
all.equal(predict(lat, dataLatentIV), fitted(lat)) # TRUE


[Package REndo version 2.4.10 Index]