egouldo / ManyAnalysts

Source code for ManyEcoEvo Manuscript
https://egouldo.github.io/ManyAnalysts/
GNU General Public License v3.0
2 stars 0 forks source link

Update equation / text in SM2 for yi standardisation #64

Closed egouldo closed 1 month ago

egouldo commented 2 months ago

Note current working version is here: https://github.com/egouldo/ManyAnalysts/blob/42-mv-fns-2-pkg/supp_mat/SM2_EffectSizeAnalysis.qmd

Here's where the equation / text are: https://github.com/egouldo/ManyAnalysts/blame/fea6e7bb68375f22e3a32d6cf08dde02868d9a3e/supp_mat/SM2_EffectSizeAnalysis.qmd#L694-L699

Can you please:

Note, you can make x bar with: \bar{x}


From https://github.com/metamelb-repliCATS/ManyAnalysts/issues/127#issuecomment-1157261193

  • [ ] Following transformation to the response scale, we then must standardise the out of sample estimates. Note that this is NOT the same process as Z-transforming the effect sizes, as we did with the est_to_Zr() fun when calculating $Zr$ / $V{Z_r}$. We will make a table of population parameters from our raw datasets supplied to the analysts, including parameters for all response variables. We will use those values to standardise:

$$ \frac{ {\mu}_{i} - \bar{x}_j }{ SD_j } $$

Where $\mu$ is the 'population' parameter taken from our original dataset for variable $i$, and $x bar$ and $SD$ are the out of sample point estimate values supplied for analysis $j$.

Note that for the response variables that were scaled and centered, or else mean-centred before model fitting, we do not need to standardise because these are already on the Z-scale. In doing so we make the assumption that analysts' data subsetting will have little effect on the outcomes.

If all goes well, Shinichi said we should expect the resultant values to be between -3 and 3.

Originally posted by @egouldo in https://github.com/metamelb-repliCATS/ManyAnalysts/issues/38#issuecomment-1157262650

hannahsfraser commented 2 months ago

I think I have fixed this but will need to check how it looks when rendered

egouldo commented 2 months ago

I think I have fixed this but will need to check how it looks when rendered

Thanks @hannahsfraser , I've made a few minor changes. PS if you view the document in "visual" mode rather than "source" mode in RStudio, and put your curser inside the $$, RStudio will show you what the rendered equation looks like without actually having to render the document:

image

egouldo commented 2 months ago

Also, While the original text did say:

Note that for the response variables that were scaled and centered, or else mean-centred before model fitting, we do not need to standardise because these are already on the Z-scale. In doing so we make the assumption that analysts' data subsetting will have little effect on the outcomes.

This is not actually how it was implemented because I did not have capacity to go through and double check whether every analysis response variable was scaled+centred or not.

So we have two options:

I vote for the latter. The calculation wasn't pre-registered so we don't have to adhere to it. We are placing less weight on the out-of-sample meta-analyses anyways, so I am not so concerned about additional uncertainty being introduced into each estimate.

What do you think @hannahsfraser @itchyshin ?

egouldo commented 2 months ago

Note, I've merged the pull request changes into 42-mv-fns-2-pkg for now, but leaving issue open.

egouldo commented 2 months ago

Also, While the original text did say:

Note that for the response variables that were scaled and centered, or else mean-centred before model fitting, we do not need to standardise because these are already on the Z-scale. In doing so we make the assumption that analysts' data subsetting will have little effect on the outcomes.

This is not actually how it was implemented because I did not have capacity to go through and double check whether every analysis response variable was scaled+centred or not.

So we have two options:

  • [ ] double check implementation in each analysis to see if was scaled+centred,
  • [ ] remove this text, and scale and centre all out of sample estimates anyway.

I vote for the latter. The calculation wasn't pre-registered so we don't have to adhere to it. We are placing less weight on the out-of-sample meta-analyses anyways, so I am not so concerned about additional uncertainty being introduced into each estimate.

What do you think @hannahsfraser @itchyshin ?

So in checking egouldo/ManyEcoEvo/ I realised that we had already assigned z.scored responses to the identity_back() transformation. Therefore we do correctly implement this calculation. Marking as closed.

egouldo commented 2 months ago

Reopening because want to replace the text VAR.

We don't actually calculate the variance, but supply this as the variance arg to metaphor.

hannahsfraser commented 2 months ago

I think we should just update the text to accurately reflect what we did and leave it at that

egouldo commented 2 months ago

Sounds like a good plan Hannah. Happy to action that.