I'm using the quantreg package to make a regression model using the 99th percentile of my values in a data set. Based on advice from a previous stackoverflow question I asked, I used the following code structure.
mod <- rq(y ~ log(x), data=df, tau=.99) pDF <- data.frame(x = seq(1,10000, length=1000) ) pDF <- within(pDF, y <- predict(mod, newdata = pDF) )
which I show plotted on top of my data. I've plotted this using ggplot2, with an alpha value for the points. I think that the tail of my distribution is not being considered sufficiently in my analysis. Perhaps this is due to the fact that there are individual points, that are being ignored by the percentile type measurement.
One of the comments suggested that
The package vignette includes sections on nonlinear quantile regression and also models with smoothing splines etc.
Based on my previous question I assumed a logarithmic relationship, but I'm not sure if that is correct. I thought I could extract all the points at the 99th percentile interval and then examine them separately, but I'm not sure how to do that, or if that is a good approach. I would appreciate any advice on how to improve identifying this relationship.