egouldo / ManyAnalysts

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

Double check correct back-transformation process for yi #60

Closed egouldo closed 1 month ago

egouldo commented 1 year ago

I would like to double-check that the transformation of the analyst's submitted values onto the response scale has been calculated correctly.

I have put together a file with the following variables:

Some information on how the response-scale estimates are calculated

  1. We assign a transformation_type to be applied to the estimate using this code
  2. Depending on the transformation_type different *_back() transformation functions are applied the estimates. The code that assigns which function to use is here
  3. All *_back() transformation functions take the value and the se to then simulate a distribution of length sim from which the mean, se, and 95%CIs are returned. You can see the code for each function

Tasks for @parkerth :

https://private-user-images.githubusercontent.com/8400682/260696092-f121634e-0ff8-459f-a613-fe6a6063cf6d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE2OTIxNDY0NDMsIm5iZiI6MTY5MjE0NjE0MywicGF0aCI6Ii84NDAwNjgyLzI2MDY5NjA5Mi1mMTIxNjM0ZS0wZmY4LTQ1OWYtYTYxMy1mZTZhNjA2M2NmNmQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQUlXTkpZQVg0Q1NWRUg1M0ElMkYyMDIzMDgxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyMzA4MTZUMDAzNTQzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2NkYzdkODFkOTM5YmJiZDhjYzBkNDY1MWVhMmJiMWM2NzU3MmExZWNjZGM4ZTY3MjI2OTJiYWFkY2I0M2Q3MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.9Q2fqlYQnVcwsyzaUIJ84sZWPxm8QMzON0mYq4JyHpk

Where $link_fun and $response use the value for that analysis in those columns for transformation_type, i.e. the analyst submitted value.

There could be two explanations for getting extreme values:

  1. The analyst has told us the wrong information about the link function, response construction/transformation, or the wrong adjusted degrees of freedom.
  2. Our _back transformations are wrong.
  3. Something else? The analysts' estimate uncertainty is just huge and therefore when we transform we're getting crazy distributions -> crazy back-transformed estimates?

Here's the file: checking_back_transformation.csv

Originally posted by @egouldo in https://github.com/egouldo/ManyAnalysts/issues/272#issuecomment-1679839449

egouldo commented 1 year ago

Just adding a note to remind that we agreed this wasn't necessary to fix before distributing the draft manuscript to analysts.

parkerth commented 1 month ago

I will try to get to this later today.

egouldo commented 1 month ago

Thanks! And sorry I just re-found this issue in the old repo!

parkerth commented 1 month ago

The links in this issue don't work, so I can't check what's going on. That said, is this in reference to the Eucalyptus data that we ultimately decided to delete the many extreme outliers? I think we may already have dealt with this.

hannahsfraser commented 1 month ago

ping @egouldo This one looks resolved?

egouldo commented 1 month ago

Agreed, suspect this was in relation to the extreme yi values, closing.