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

Add sample size-based ML/REML estimators #9

Merged
merged 7 commits into from
Dec 29, 2019
Merged

Add sample size-based ML/REML estimators #9

merged 7 commits into from
Dec 29, 2019

Conversation

tyarkoni
Copy link
Contributor

@tyarkoni tyarkoni commented Dec 28, 2019

Adds a new SampleSizeBasedLikelihoodEstimator class that produces maximum-likelihood random-effects estimates for datasets that have estimates and sample sizes but no variances. This is maybe the modal situation with fMRI data, so it's a nice thing to have.

The approach is based on a simple idea in this paper (though I'm sure it's been suggested before in other places), which is to replace the standard log-likelihood function for the random-effects model with an analogous LL based not only beta and tau^2, but also a sigma^2 parameter that's scaled by the (known) inverse sample size. I.e., instead of study estimates being distributed with a variance of tau^2 + v (where v is the vector of observed sampling variances for the available studies), we assume they're distributed with a variance of tau^2 + sigma^2/n (where n is the vector of known sample sizes, and sigma^2 is an additional parameter estimated from the data).

I haven't done any systematic investigation of the performance of this estimator, but the above paper suggests it works reasonably well in many cases, and if nothing else this seems like an improvement over just fitting a GLM to the estimates directly (i.e., ignoring sampling variance/sample size entirely).

@tyarkoni tyarkoni merged commit c9e4d2e into master Dec 29, 2019
@tyarkoni tyarkoni deleted the sample-size branch May 5, 2020 15:09
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

Successfully merging this pull request may close these issues.

1 participant