# NOT RUN {
#load dataset dataCopC1, where P is endogenous, continuous and not normally distributed
data(dataCopC1)
# }
# NOT RUN {
c1 <- copulaCorrection(formula = y ~ X1 + X2 + P, endoVar ="P", type = "continuous", method = "1",
intercept=TRUE, data=dataCopC1)
summary(c1)
# }
# NOT RUN {
# an alternative model can be obtained using "method ="2"".
c12 <- copulaCorrection(formula = y ~ X1 + X2 + P, endoVar = "P", type = "continuous", method = "2",
intercept=TRUE, data = dataCopC1)
summary(c12)
# with 2 endogeneous regressors no initial parameters are needed, the default is the augmented OLS.
data(dataCopC2)
c2 <- copulaCorrection(formula = y ~ X1 + X2 + P1 + P2, endoVar = c("P1","P2"),
type = "continuous", method="2", intercept=TRUE, data=dataCopC2)
summary(c2)
# load dataset with 1 discrete endogeneous variable.
# having more than 1 discrete endogenous regressor is also possible
data(dataCopDis)
c3 <- copulaCorrection(formula = y ~ X1 + X2 + P, endoVar = "P", type = "discrete",
intercept=TRUE, data = dataCopDis)
summary(c3)
# }
Run the code above in your browser using DataLab