ThisIsLorenzo / PFAS_Trophic_Magnification

0 stars 0 forks source link

log-transforming standard errors #3

Open ThisIsLorenzo opened 3 months ago

ThisIsLorenzo commented 3 months ago

Some studies provide the Trophic Magnification Factor (TMF) (i.e., the slope of PFAS concentrations on the original scale) and its Standard Error (SE). However, we want the slope and its SE on the logarithmic scale. The TMF is the anti-log of the slope. So we can calculate the slope log transforming the TMF.

However, we cannot simply log transform the TMS's SE to find the slope's SE. We need to use the Deltha method (Taylor expansions for the moments of functions of random variables). image The second order approximation is not need it. We can use the first-order. Thus, the last term (i.e., 1/4 etc...) of the formula above can be neglected. So, we can calculate the slope's SE from the original scale if the slope was ln-transformed:

slope's SE = original scale's SE / original scale's slope

we can also calculate the slope's SE from the original scale if the slope was log-transformed:

slope's SE = original scale's SE / original scale's slope * ln10

Note that ln10 = natural log of 10. image If we want to use the second-order approximation, the formula for ln-transformed slope would be: slope's SE = (original scale's SE / original scale's slope) - 1/4 (-original scale's slope^-2) * original scale's SE^4

This is how I am calculating the standard errors of slope from the standard errors of slopes at the original scale @itchyshin

We cannot calculate the log-transformed slopes from slope valued 0 at the original scale. For this reason, we need to add a correction factor (a small number that make the slope deviate from 0 but small enough to not affect the slope value). Usually, we use 0.001 because it is small enough: image