Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Quantile regression functions
Contributed by: Anton Antonov
Various Quantile Regression (QR) functions. Multi-dimensional QR is supported.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["AntonAntonov/QuantileRegression"]
To load the code after installation, evaluate this code:
Needs["AntonAntonov`QuantileRegression`"]
InterpolationOrder | 3 | interpolation order |
Method | LinearProgramming | method for the quantile regression computations |
Make a random signal:
In[1]:= |
Compute QuantileRegression with five knots for the probabilities 0.25 and 0.75:
In[2]:= |
Here are the formulas of the obtained regression quantiles:
In[3]:= |
Out[3]= |
Here is a plot of the original data and the obtained regression quantiles:
In[4]:= |
Out[4]= |
Find the fraction of the data points that are under the second regression quantile:
In[5]:= |
Out[5]= |
The obtained fraction is close to the second probability, 0.75, given to QuantileRegression.
Here is a quantile regression computation over a numerical vector:
In[6]:= |
Out[8]= |
Here is a quantile regression computation over a time series object:
In[9]:= |
Out[11]= |
Here we find are some randomly generated 2D points:
In[12]:= |
Here 2D quantile envelopes are computed of the points:
In[13]:= |
Here the envelopes are plotted together with the data:
In[14]:= |
Out[14]= |
Generate noisy 3D data:
In[15]:= |
Compute Quantile regression for probabilities 0.1 and 0.9:
In[16]:= |
Out[1]= |
Plot the data points and regression quantiles together:
In[17]:= |
Out[18]= |
Wolfram Language Version 13.0