Learn R Programming

REndo (version 1.3)

copulaDiscrete: Fitting Linear Models with Endogeneous Discrete Regressors using Internal Instrumental Variables

Description

Fits linear models with discrete, endogeneous regressors using the approach described in Park and Gupta (2012). Due to the variablility in pStar, a simulation was needed in order to obtain the coefficient estimates. Then, in order to get the Z-scores and p-values the sum of the Z method was used as described in Zaykin, D V.(2011). "Optimally weighted Z-test is a powerful method for combining probabilities in meta-analysis". Journal of Evolutionary Biology, 24:1836-1841.

Usage

copulaDiscrete(formula, endoVar, intercept = NULL, data)

Arguments

formula

the model formula, e.g. y ~ X1 + X2 + P.

endoVar

a string with the name of the endogenous variable/s, in quotation marks.

intercept

an optional parameter. The model is estimated by default with intercept. If no intercept is desired or the regressors matrix X contains already a column of ones, intercept should be given the value "FALSE", otherwise the value "TRUE".

data

a data frame or matrix containing the variables of the model.

Value

Returns an object of class "lm".

References

Park, S. and Gupta, S., (2012), 'Handling Endogeneous Regressors by Joint Estimation Using Copulas', Marketing Science, 31(4), 567-86.