1

I am trying to estimate a switching regression model (Tobit-5) with the sampleSelection package in R. The code I am using is

switchmodel2<-selection(selectEq, list(outcomeEq,outcomeEq), method = "2step")

once I define selectEq as the selection regression of the regimes at the first stage, and outcomeEq as the outcome equation specification common to both regimes.

Unfortunately, I get NAs on all standard errors (and therefore even the t-stats and p-values) of the outcome regressions and the error terms. The selection equation seems to be properly estimated instead.

If I try to run this model with maximum likelihood, rather than the 2-step approach, the model is properly estimated. My question therefore is: what do I have to code in order to estimate a Tobit-5 model with the two-step approach?

Many thanks to everyone is going to help me,

Best

Marco Mello
  • 175
  • 1
  • 9
  • Hard to know what the problem is without seeing your data. Maybe you could post a part of your dataset which replicates the issue (see info here https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Otto Kässi Sep 20 '18 at 15:20
  • I think I understood what is the issue. The two-step approach does not produce efficient standard errors, therefore the package does not return them as a "suggestion". The maximum likelihood approach instead produce the efficient ones. The only way I found to get standard errors via 2-step is computing the all procedure by hand, performing the probit model first and then using the propensity score in the two outcome equations. – Marco Mello Sep 21 '18 at 20:45
  • I also get na's as standard errors when trying to do a switching regression with `method='2step'`. To be honest, that sounds like a bug. I cannot think of any theoretical reason why the 2-step procedure would not return standard errors. If you end up manually calculating the propensity scores, remember that you need to also adjust your standard errors to account for the fact that your propensity scores are estimates and not observed variables. – Otto Kässi Sep 24 '18 at 17:21
  • Thank you for your help Otto. Do you think my explanation can be reasonable? I think that in the purpose of the author of the package is to tell you that those standard errors are not correct and therefore the output returns NAs. I know that we have to adjust the standard errors from the two-step approach but I do not exactly how to do it. Do you have any reference which can help me? I think I have to obtain the residuals from the OLS and than to costruct weights for the weighted least squares but I am not sure how to build the weights.. – Marco Mello Sep 24 '18 at 20:02
  • There are closed form expressions for the standard errors if the assumption of joint normality holds. If the assumption does not hold, then both ML and 2-step methods are just as incorrect. Therefore, I do not se why the authors would have not implemented the std errors for 2-step models. Regarding the adjustment of standard errors, you should either google it (try "generated regressors standard errors"), or read https://www.tandfonline.com/doi/pdf/10.1198/073500102753410417. After that, if you have more questions about this, you can turn to https://stats.stackexchange.com for more help. – Otto Kässi Sep 24 '18 at 20:29

0 Answers0