methylKit icon indicating copy to clipboard operation
methylKit copied to clipboard

Suggestion: predicted effect size corrected for unbalanced covariates

Open therealgenna opened this issue 4 years ago • 0 comments

https://github.com/al2na/methylKit/issues/224

When methylation difference is calculated there are 3 options for effect size calculation: weighted mean, unweighted mean and model prediction (predicted). All of these options calculate or estimate effect size (i.e., methylation difference) which is due both to the group (e.g., treatment vs. control) as well as due to covariates, when they are present/used, and if they are unbalanced (i.e., different) across the treatment groups.

I suggest an additional simple calculation for an average effect size prediction, corrected for covariates (named predicted2 in the new piece of the code). Basically, all covariate sets found in any of the treatment groups will be used in all groups in making model predictions. The rest is the same. In that case the predicted effect will not be due to difference in covariates, will be based on covariate sets used in the data, and will agree with reported statistical significance for group effect. This is also what might be of interest to the user (as a note, it might make sense to return all effect size calculations together, not just one, so that there is no need to rerun the function to get a different version of effect size estimate.)

therealgenna avatar Mar 09 '21 02:03 therealgenna