# Quantile regression for finding trends

I have 47 years of rainfall data, like.

  days  year   rf
1   1961    0.0
2   1961    0.5
3   1961    0.01
4   1961    0.0
5   1961    0.2
..  ....    .
17153 2007    0.0
17154 2007    0.0
17155 2007    0.0


I was trying to find out trends in extreme events using quantreg package in R. If I plot rainfall~days and Rainfall~year, Which one gives a better information about trends in these period.

Code I used:

library(quantreg)
data[data==-9.99e+08] = NA
plot(data$rf~data$year, col='black', type="p", pch=20 ,cex=.4, xlab="year", ylab="Rainfall(mm/Day)")
qr  <- abline(rq(data$rf~data$year,tau=.99), col="blue", lty=1, lwd=1)
summary(rq(data$rf~data$year,tau=.99))


Summary1:

Coefficients:
Value    Std. Error t value  Pr(>|t|)
(Intercept) 85.99468  4.44930   19.32771  0.00000
data$days 0.00042 0.00050 0.82377 0.41008  Summary2: Coefficients: Value Std. Error t value Pr(>|t|) (Intercept) -210.20522 914.34116 -0.22990 0.81817 data$year      0.15109    0.46042    0.32816    0.74279

• They're just different. At first blush, seasonality is just noise from the point of view of determining whether there is long-term trend. On the other hand, changing seasonality may just be part of climatic change, but you need more than the first analysis to look at that. By the way, regressing on year has a ludicrous side-effect. Your intercept is negative (which is physically absurd) and has massive uncertainty, because it is for year == 0, way outside the data, and the confidence intervals widen away from the centre of the data. Better to regress on e.g. year $-$ 1980 or year $-$ 2000. – Nick Cox Sep 22 '17 at 13:40
• For more discussion see stats.stackexchange.com/questions/65900/… and references there. – Nick Cox Sep 22 '17 at 13:45