Skip to content

Hickman models with two binary dependent variables in R

5 messages · Faradj Koliev, PIKAL Petr, Arne Henningsen

#
Hi everyone, 

How do I run Heckman models in R with two binary dependent variables? 

sampleSelection package in R works with standard heckman models ( binary DV for the selection equation and continuous DV for the outcome equation). In my case dependent variables are both binary (actually ordered but I didn?t find anything on that)

So using sampleSelection package one could do this by running: 

SelectionEquation <- binaryDV1 ~ x1+x2+x3+x4

OutcomeEquation <-  binaryDV2~o7+x1+x4+x5

HeckmanModel <- heckit(SelectionEquation,OutcomeEquation, data=mydata, method="2step")


The problem is that heckit() doesn?t work here. I think in STATA one could use heckprob command for this. Anyone who knows more than me? 

Thanks!
1 day later
#
Hi

See in line
#
See also:

http://r-forge.r-project.org/forum/forum.php?thread_id=31866&forum_id=844&group_id=256
On 26 August 2016 at 16:11, PIKAL Petr <petr.pikal at precheza.cz> wrote:

  
    
#
Dear Arne, 

Many thanks for this, 

It actually worked with heckit() command as well, do I need to use selection()? 

Also, I would be really grateful if you can suggest a package that would allow for estimation of heckman models with two ordered variables (0-1-2). Can sampleSelection handle this? 

Warm regards, 
Faradj

  
  
1 day later
#
Dear Faradj
On 27 August 2016 at 16:11, Faradj Koliev <faradj.g at gmail.com> wrote:
I suggest that you use the selection() command/function only. heckit()
is just a wrapper to selection() with the only difference that
heckit() estimates the model with the 2-step method by default, while
selection() estimates the model by the maximum likelihood method by
default (unless specified otherwise with argument "method").

I see no good reason for estimating the sample-selection model by the
2-step method instead of the maximum likelihood method.
Do you mean that the dependent variable of the selection equation is
an ordered variable with three levels (0-1-2), that the dependent
variable of the outcome equation is an ordered variable with three
levels (0-1-2), or that both of the dependent variables are ordered
variable with three levels (0-1-2) each?

In any case: no, this is not implemented in the sampleSelection package. Sorry!

Anyway, I guess that it is not too complicated to derive the
likelihood function and implement the estimation yourself, e.g., using
the maxLik package. If you do this, I would be happy to help you to
implement this feature in the sampleSelection package.

Best wishes,
Arne