statistical interpretation in report_assessment#568
Conversation
|
@hallareinert following on from our discussion about logicals the other day, using isTRUE is really good when you have a logical passed in by the user (because they could put anything in the function call). However, if the logical |
| trend_description, | ||
| "Higher values of", | ||
| info$det_name, | ||
| "indicate healthier organisms, so the trend suggests a", |
There was a problem hiding this comment.
small thing, but suggestion: include the articles "a" and "an" in the if statement:
"so the trend suggests",
if (wk$overall_change > 0) "an improving" else "a deteriorating",
hallareinert
left a comment
There was a problem hiding this comment.
a tiny suggestion on line 1067, otherwise good as far as I'm aware
annelaerkes
left a comment
There was a problem hiding this comment.
I am confused about the revised comment and how it links to the code. The text suggests to me that the level of the significance in the comment refers to the smoother model but the code suggests to me that it refers to the log-linear overall trend? Can this be clarified in the comments? Maybe I misunderstand how the smoother trend and overall trend is connected?
# these models have evidence of non-linearity (in one form or another) by
# virtue of being selected by AIC or AICc; however, the level of significance
# might be > 0.05
if (wk$p_overall_trend < 0.01) {
sig_strength <- "strong"
} else if (wk$p_overall_trend < 0.05) {
sig_strength <- "moderate"
See #566.
The statistical interpretation in
report_assessmentis too simplistic when a smooth model is selected. This is because the model is selected by AICc sop_overall_trendis not necessarily 'significant' at the 5% level. However, in such cases, the existing text just says that there is no significant trend in the data.The statistical interpreation is now more nuanced, saying that there is strong (p < 0.01), moderate (p < 0.05) or weak (p >= 0.05) evidence of a trend in the time series (depending on the value of
p_overall_trend). Note that weak could include a p-value as high as 0.15 if a smooth on 2 df is selected and there are lots of years and the improvement in AICc over the mean model is marginal.Have made the interpretation of imposex change point models similarly nuanced.
(The code behind the statistical interpretation could be streamlined considerably, but not this time!)
Tested on many time series from the OSPAR 2026 assessment.