Skip to content

p-values in Trend function

Discussing with @vtorralba, we ending talking about p-values on the Trend() function.

Some time ago, she did a version of the function for computing the p-values using the anova() function:

if (conf) {
    enltrend[c(1, 3), j2, j3, j4, j5, j6, j7, j8, j9, j10] <- confint(lm.out, level = siglev)[2, 1:2]
    enltrend[5, j2, j3, j4, j5, j6, j7, j8, j9, j10] <- anova(lm.out)$'Pr(>F)'[1]
           }

https://earth.bsc.es/gitlab/es/ESS/-/blob/fd6da8ea323a2c44352b510b0282dfc1684f5a2d/trends/Trend_pval.R

It would be good to consider this enhancement, so, the users don't need to look for other tools to compute the pvalues of the Trend.

Núria