endoSwitch2Stage: Endogenous switching regression

Description Usage Arguments Details Value References Examples

View source: R/endoSwitch2Stage.R

Description

This function estimates the endogenous switching regression model via two-stage estimations (Maddala, 1986)

Usage

1
endoSwitch2Stage(data, OutcomeDep, SelectDep, OutcomeCov, SelectCov)

Arguments

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.

Details

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.

Value

A list containing regression results.

References

Maddala, G. S. “Limited-Dependent and Qualitative Variables in Econometrics.” Cambridge Books. Cambridge University Press, 1986.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)

endoSwitch documentation built on March 26, 2020, 9:38 p.m.