Dear Statalists,
I am estimating a Multilevel Mixed Effects model using the mixed comment, likelihood ratio tests imply that this model is preferred over a normal OLS model.
Additionally, I suspected my data set to be subject of sample selection bias on an observable variable and therefore performed a Heckman test. The results indicate significant sample selection bias and hence that I should include the Mills ratio estimated by the Heckman test.
As far as I know Stata does not have an option that allows to combine the automatic twostep Heckman model with a Multilevel Mixed Effects model. Instead, I therefore manually estimated the mills ratios using the below code:
probit InSampleDummy ObservableSelectionBiasVariable
predict zg1, xb
g phi1=normalden(zg1)
g PHI1=normal(zg1)
g Lambda=phi1/PHI1
And subsequently included Lambda in my Multilevel Mixed Effects model using the following code:
mixed DependentVar IndependentVar Lambda || Groupingvariable: IndependentVar
My question is if this method is correct. I can find very little information on correcting for Sample selection bias in Multilevel Mixed Effect models and wonder if a Heckman correction can be used in a Multilevel Mixed Effects model at all?
Thanks for your help in advance,
Fabrizio
I am estimating a Multilevel Mixed Effects model using the mixed comment, likelihood ratio tests imply that this model is preferred over a normal OLS model.
Additionally, I suspected my data set to be subject of sample selection bias on an observable variable and therefore performed a Heckman test. The results indicate significant sample selection bias and hence that I should include the Mills ratio estimated by the Heckman test.
As far as I know Stata does not have an option that allows to combine the automatic twostep Heckman model with a Multilevel Mixed Effects model. Instead, I therefore manually estimated the mills ratios using the below code:
probit InSampleDummy ObservableSelectionBiasVariable
predict zg1, xb
g phi1=normalden(zg1)
g PHI1=normal(zg1)
g Lambda=phi1/PHI1
And subsequently included Lambda in my Multilevel Mixed Effects model using the following code:
mixed DependentVar IndependentVar Lambda || Groupingvariable: IndependentVar
My question is if this method is correct. I can find very little information on correcting for Sample selection bias in Multilevel Mixed Effect models and wonder if a Heckman correction can be used in a Multilevel Mixed Effects model at all?
Thanks for your help in advance,
Fabrizio