predict.rendo.copula.correction: Predict method for Models using the Gaussian Copula Approach

Description Usage Arguments Value See Also Examples

View source: R/f_s3_rendocopulacorrection.R

Description

Predicted values based on linear models with endogenous regressors estimated using the gaussian copula.

Usage

1
2
## S3 method for class 'rendo.copula.correction'
predict(object, newdata, ...)

Arguments

object

Object of class inheriting from "rendo.copula.correction"

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.copula.correction produces a vector of predictions

See Also

The model fitting function copulaCorrection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
data("dataCopCont")

c1 <- copulaCorrection(y~X1+X2+P|continuous(P), num.boots=10,
                       data=dataCopCont)

# returns the fitted values
predict(c1)

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

## End(Not run)

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