endoSwitch2Stage {endoSwitch} | R Documentation |
This function estimates the endogenous switching regression model via two-stage estimations (Maddala, 1986)
endoSwitch2Stage(data, OutcomeDep, SelectDep, OutcomeCov, SelectCov)
data |
a data frame. Data for running the regression analysis. |
OutcomeDep |
character. Dependent variable in the outcome equation. |
SelectDep |
character. Dependent variable in the Selection model. The variable must be binary (0 or 1). |
OutcomeCov |
character vector. Covariates in the outcome equation. |
SelectCov |
character vector. Covariates in the selection equation. |
The first stage uses a probit model to estimate the selection equation. The second stage uses ordinary least squares including the inverse mills ratios computed from the first stage estimation results to estimate the outcome equations.
A list containing regression results.
Maddala, G. S. “Limited-Dependent and Qualitative Variables in Econometrics.” Cambridge Books. Cambridge University Press, 1986.
data(ImpactData)
OutcomeDep <- 'Output'
SelectDep <- 'CA'
OutcomeCov <- c('Age')
SelectCov <- c('Age', 'Perception')
Results <- endoSwitch2Stage(ImpactData, OutcomeDep, SelectDep, OutcomeCov, SelectCov)
# First stage regression results
summary(Results$FirstStageReg)
# Second stage regression results -- non-adopter
summary(Results$SecondStageReg.0)
# Second stage regression results -- adopter
summary(Results$SecondStageReg.1)