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.
copulaDiscrete(formula, endoVar, intercept = NULL, data)
the model formula, e.g. y ~ X1 + X2 + P
.
a string with the name of the endogenous variable/s, in quotation marks.
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".
a data frame or matrix containing the variables of the model.
Returns an object of class "lm".
Park, S. and Gupta, S., (2012), 'Handling Endogeneous Regressors by Joint Estimation Using Copulas', Marketing Science, 31(4), 567-86.