Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using mle2 with clustered data #28

Open
mclements opened this issue Apr 29, 2020 · 2 comments
Open

Using mle2 with clustered data #28

mclements opened this issue Apr 29, 2020 · 2 comments

Comments

@mclements
Copy link

Ben,

How difficult would it be to adapt an mle2 object for clustered data using a sandwich estimator?

In rstpm2, I currently replace the vcov slot with a sandwich estimator, but this feels like a hack. It certainly gives the wrong estimate for confint.

Would you be able to give some guidance for where I should start with confint (and other functions that depend on the profile likelihood), please?

Sincerely, Mark.

@bbolker
Copy link
Owner

bbolker commented Apr 29, 2020

I think it'll be tough to combine profile likelihood CIs with sandwich estimators; in my very limited knowledge/experience, sandwich estimators etc. are very much developed in the Wald sampling framework - to that extent, your hack seems reasonable. To the extent that the log-likelihood surface is far from quadratic, I'm not even aware of the theory that would explain how to adjust it for clustered data/heteroscedasticity/etc. (except for building a model with explicit random effects, which is another can of worms ...) - not that that means it doesn't exist ...

@mclements
Copy link
Author

After doing some reading: composite likelihoods have been used in this context. In particular, Chandler and Bate (2007) developed methods for "stretching" the likelihood to use a chi-squared distribution, with an implementation in the chandwich package on CRAN.

That said, I suggest you close this issue - I can use the multivariate delta method with the sandwich estimator, rather than using the profile likelihood. Thank you for your comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants