tyburns / WHAPDataAnalysis

Apache License 2.0
1 stars 0 forks source link

Consolidate method to estimate g_m2 as a function of LIT_Strat in main script #10

Open emilioalaca opened 3 years ago

emilioalaca commented 3 years ago

Originally, I used an rlm() without transformation to estimate mass per area in each LIT-Strat:

st_rlm3 <- rlm(mass_g_m2 ~ LIT_Strat, na.action = na.exclude, maxit = 40, data = qdt_st)

I later noticed that residual variance increased with fitted values and used a log transformation to correct this. The transformation stabilized variance and improved normality, but it also reduced estimates by 5-10%.

For 2021-22 I used:

st_rlm3 <- rlm(log(mass_g_m2) ~ LIT_Strat, na.action = na.exclude, maxit = 40, data = qdt_st)

I used a different transformation for 2020-21a to compare the results to 2020-21 without transformation.

The issue: Consolidate all analyses. Create a method and corresponding code to automatically select the transformation, e.g. Box-Cox transformation. Rerun all analyses.