Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Potential Bug in -ivprobit, twostep-?

    Hello all,

    -ivprobit, twostep- is an application of the control function approach to the probit model. The probit model is instrumented by including the residuals of a first-stage regression of the endogenous covariate(s) on the instruments and controls. My understanding is that the second stage needs to be checked for perfect predictors of the dependent variable and collinearity amongst the regressors, and that the first stage just needs to be checked for collinearity amongst the regressors. As the manual puts it,
    Instruments that are perfect predictors do not affect estimation, so they are not checked.
    Yet, the code that checks the first stage in the source code is:
    Code:
    // Need to check reduced-form model if two-step est
    if "`twostep'" != "" {
            di as text "Checking reduced-form model..."
            if `"`ehold'"' != "" {
                    _est hold `ehold', restore nullok
            }
            `vv' ///
            cap noi _rmcoll `lhs' `inst' `exog' if `touse'    ///
                    `wgt', touse(`touse') logit expand `asis' ///
                    noskipline
            if c(rc) {
                    error c(rc)
            }
            if `"`ehold'"' != "" {
                    _est unhold `ehold'
            }
            mat `rules' = `rules' \ r(rules)
            local vlist "`r(varlist)'"
            gettoken lhs vlist : vlist
    }
    else {
            `vv' ///
            _rmcoll `inst' `exog' if `touse' `wgt', expand
            local vlist "`r(varlist)'"
    }
    local n : list sizeof inst
    local inst
    forval i = 1/`n' {
            gettoken v vlist : vlist
            local inst `inst' `v'
    }
    local exog : copy local vlist
    It seems that if the -twostep- option is specified, the code is actually checking the instruments for perfect predictors. Does anyone know if this is intentional or a bug?
Working...
X