Robust M-quantiles are estimated using an iterative penalised reweighted least squares approach. Effects using quadratic penalties can be included, such as P-splines, Markov random fields or Kriging.
Mqreg(formula, data = NULL, smooth = c("schall", "acv", "fixed"),
estimate = c("iprls", "restricted"),lambda = 1, tau = NA, robust = 1.345,
adaptive = FALSE, ci = FALSE, LSMaxCores = 1)
An object of class 'expectreg', which is basically a list consisting of:
The final smoothing parameters for all expectiles and for all effects in a list. For the restricted and the bundle regression there are only the mean and the residual lambda.
The intercept for each expectile.
A matrix of all the coefficients, for each base element a row and for each expectile a column.
The fitted values for each observation and all expectiles, separately in a list for each effect in the model, sorted in order of ascending covariate values.
Vector of the response variable.
List with the values of the covariates.
The formula object that was given to the function.
Vector of fitted expectile asymmetries as given by argument expectiles
.
List of characters giving the types of covariates.
List of additional parameters like neighbourhood structure for spatial effects or 'phi' for kriging.
Complete design matrix.
Fitted values \( \hat{y} \).
plot
, predict
, resid
,
fitted
, effects
and further convenient methods are available for class 'expectreg'.
An R formula object consisting of the response variable, '~'
and the sum of all effects that should be taken into consideration.
Each effect has to be given through the function rb
.
Optional data frame containing the variables used in the model, if the data is not explicitely given in the formula.
Character string defining the estimation method that is used to fit the expectiles. Further detail on all available methods is given below.
There are different smoothing algorithms that should prevent overfitting.
The 'schall' algorithm iterates the smoothing penalty lambda
until it converges,
the asymmetric cross-validation 'acv' minimizes a score-function using nlm
or the function uses a fixed penalty.
The fixed penalty can be adjusted. Also serves as starting value for the smoothing algorithms.
In default setting, the expectiles (0.01,0.02,0.05,0.1,0.2,0.5,0.8,0.9,0.95,0.98,0.99) are calculated.
You may specify your own set of expectiles in a vector. The option may be set to 'density' for the calculation
of a dense set of expectiles that enhances the use of cdf.qp
and cdf.bundle
afterwards.
Robustness constant in M-estimation. See Details
for definition.
Logical. Whether the robustness constant is adapted along the covariates.
Whether a covariance matrix for confidence intervals and the summary function is calculated.
How many cores should maximal be used by parallelization
Monica Pratesi
University Pisa
https://www.unipi.it
M. Giovanna Ranalli
University Perugia
https://www.unipg.it
Nicola Salvati
University Perugia
https://www.unipg.it
Fabian Otto-Sobotka
University Oldenburg
https://uol.de
In the least squares approach the following loss function is minimised:
\( S = \sum_{i=1}^{n}{ w_p(y_i - m_i(p))^2} \)
with weights
\( w_p(u) = (-(1-p)*c*(u_i< -c)+(1-p)*u_i*(u_i<0 \& u_i>=-c)+p*u_i*(u_i>=0 \& u_i<c)+p*c*(u_i>=c)) / u_i \)
for quantiles and
\( w_p(u) = -(1-p)*c*(u_i< -c)+(1-p)*u_i*(u_i<0 \& u_i>=-c)+p*u_i*(u_i>=0 \& u_i<c)+p*c*(u_i>=c) \)
for expectiles, with standardised residuals \(u_i = 0.6745*(y_i - m_i(p)) / median(y-m(p))\) and robustness constant c.
Pratesi M, Ranalli G and Salvati N (2009) Nonparametric M-quantile regression using penalised splines Journal of Nonparametric Statistics, 21:3, 287-304.
Otto-Sobotka F, Ranalli G, Salvati N, Kneib T (2019) Adaptive Semiparametric M-quantile Regression Econometrics and Statistics 11, 116-129.
expectreg.ls
, rqss
data("lidar", package = "SemiPar")
m <- Mqreg(logratio~rb(range,"pspline"),data=lidar,smooth="f",
tau=c(0.05,0.5,0.95),lambda=10)
plot(m,rug=FALSE)
Run the code above in your browser using DataLab