#load dataset dataCopC1, where P is endogenous, continuous and not normally distributed
data(dataCopC1)
y <- dataCopC1[,1]
X <- dataCopC1[,2:5]
P <- dataCopC1[,5]
c1 <- copulaCorrection(y, X, P, type = "continuous", method = "1", intercept=FALSE)
summary(c1)
# to obtain the standard errors use the boots() function
# se.c1 <- boots(10, y, X, P, param = c(1,1,-2,-0.5,0.2,1), intercept=FALSE)
# an alternative model can be obtained using "method ="2"".
c12 <- copulaCorrection(y, X, P, type = "continuous", method = "2", intercept=FALSE)
summary(c12)
# load dataset with 2 continuous, non-normally distributed endogeneous regressors.
# with 2 endogeneous regressors no initial parameters needed, the default is the augmented OLS.
data(dataCopC2)
y <- dataCopC2[,1]
X <- dataCopC2[,2:6]
P <- dataCopC2[,5:6]
c2 <- copulaCorrection(y, X, P, type = "continuous" ,method="2", intercept=FALSE)
summary(c2)
# load dataset with 1 discrete endogeneous variable.
# having more than 1 discrete endogenous regressor is also possible
data(dataCopDis)
y <- dataCopDis[,1]
X <- dataCopDis[,2:5]
P <- dataCopDis[,5]
c3 <- copulaCorrection(y, X, P, type = "discrete", intercept=FALSE)
summary(c3)
Run the code above in your browser using DataLab