Title: | M-Quantile Regression Coefficients Modeling |
---|---|
Description: | Parametric modeling of M-quantile regression coefficient functions. |
Authors: | Paolo Frumento <[email protected]> |
Maintainer: | Paolo Frumento <[email protected]> |
License: | GPL-2 |
Version: | 1.3 |
Built: | 2024-11-09 06:13:05 UTC |
Source: | CRAN |
This package implements Frumento and Salvati (2020) method for M-quantile regression coefficients modeling (Mqrcm), in which M-quantile regression coefficients are described by (flexible) parametric functions of the order of the quantile. This permits modeling the entire conditional M-quantile function of a response variable.
Package: | Mqrcm |
Type: | Package |
Version: | 1.3 |
Date: | 2024-02-12 |
License: | GPL-2 |
The function iMqr
permits specifying the regression model.
Two special functions, slp
and plf
, are provided to facilitate model building.
The auxiliary functions summary.iMqr
, predict.iMqr
, and plot.iMqr
can be used to extract information from the fitted model.
Paolo Frumento
Maintainer: Paolo Frumento <[email protected]>
Frumento, P., Salvati, N. (2020). Parametric modeling of M-quantile regression coefficient functions with application to small area estimation, Journal of the Royal Statistical Society, Series A, 183(1), p. 229-250.
# use simulated data n <- 250 x <- rexp(n) y <- runif(n, 0, 1 + x) model <- iMqr(y ~ x, formula.p = ~ p + I(p^2)) summary(model) summary(model, p = c(0.1,0.2,0.3)) predict(model, type = "beta", p = c(0.1,0.2,0.3)) predict(model, type = "CDF", newdata = data.frame(x = c(1,2,3), y = c(0.5,1,2))) predict(model, type = "QF", p = c(0.1,0.2,0.3), newdata = data.frame(x = c(1,2,3))) predict(model, type = "sim", newdata = data.frame(x = c(1,2,3))) par(mfrow = c(1,2)); plot(model, ask = FALSE)
# use simulated data n <- 250 x <- rexp(n) y <- runif(n, 0, 1 + x) model <- iMqr(y ~ x, formula.p = ~ p + I(p^2)) summary(model) summary(model, p = c(0.1,0.2,0.3)) predict(model, type = "beta", p = c(0.1,0.2,0.3)) predict(model, type = "CDF", newdata = data.frame(x = c(1,2,3), y = c(0.5,1,2))) predict(model, type = "QF", p = c(0.1,0.2,0.3), newdata = data.frame(x = c(1,2,3))) predict(model, type = "sim", newdata = data.frame(x = c(1,2,3))) par(mfrow = c(1,2)); plot(model, ask = FALSE)
This function implements Frumento and Salvati's (2020) method for M-quantile regression coefficients modeling (Mqrcm). M-quantile regression coefficients are described by parametric functions of the order of the quantile.
iMqr(formula, formula.p = ~ slp(p,3), weights, data, s, psi = "Huber", plim = c(0,1), tol = 1e-6, maxit)
iMqr(formula, formula.p = ~ slp(p,3), weights, data, s, psi = "Huber", plim = c(0,1), tol = 1e-6, maxit)
formula |
a two-sided formula of the form |
formula.p |
a one-sided formula of the form |
weights |
an optional vector of weights to be used in the fitting process. The weights will always be normalized to sum to the sample size. This implies that, for example, using double weights will not halve the standard errors. |
data |
an optional data frame, list or environment containing the variables in |
s |
an optional 0/1 matrix that permits excluding some model coefficients (see ‘Examples’). |
psi |
a character string indicating the ‘psi’ function. Currently,
only ‘ |
plim |
the extremes of the estimation interval. You may want to model the M-quantile
regression coefficients in an interval, say, |
tol |
convergence criterion for numerical optimization. |
maxit |
maximum number of iterations. |
A linear model is used to describe the p
-th conditional M-quantile:
Assume that each M-quantile regression coefficient can be expressed as a parametric function of of the form:
where are known functions of
.
If
is the dimension of
and
is that of
,
the entire M-conditional quantile function is described by a
matrix
of model parameters.
Users are required to specify two formulas: formula
describes the regression model,
while formula.p
identifies the 'basis' .
By default,
formula.p = ~ slp(p, k = 3)
, a 3rd-degree shifted
Legendre polynomial (see slp
). Any user-defined function
can be used, see ‘Examples’.
Estimation of is carried out by minimizing an integrated loss function,
corresponding to the
integral, over
, of the loss function of standard M-quantile regression. This
motivates the acronym
iMqr
(integrated M-quantile regression). The scale parameter
sigma
is estimated as the minimizer of the log-likelihood of a Generalized
Asymmetric Least Informative distribution (Bianchi et al 2017), and is “modeled”
as a piecewise-constant function of the order of the quantile.
An object of class “iMqr
”, a list containing the following items:
coefficients |
a matrix of estimated model parameters describing the fitted M-quantile function. |
plim |
a vector of two elements indicating the range of estimation. |
call |
the matched call. |
converged |
logical. The convergence status. |
n.it |
the number of iterations. |
obj.function |
the value of the minimized integrated loss function. |
s |
the used ‘s’ matrix. |
psi |
the used ‘ |
covar |
the estimated covariance matrix. |
mf |
the model frame used. |
PDF , CDF
|
the fitted values of the conditional probability density function (PDF)
and cumulative distribution function (CDF). The CDF value should be interpreted as the order
of the M-quantile that corresponds to the observed |
Use summary.iMqr
, plot.iMqr
, and predict.iMqr
for summary information, plotting, and predictions from the fitted model.
The generic accessory functions coefficients
, formula
, terms
,
model.matrix
, vcov
are available to extract information from the fitted model.
Paolo Frumento [email protected]
Frumento, P., Salvati, N. (2020). Parametric modeling of M-quantile regression coefficient functions with application to small area estimation, Journal of the Royal Statistical Society, Series A, 183(1), p. 229-250.
Bianchi, A., et al. (2018). Estimation and testing in M-quantile regression with application to small area estimation, International Statistical Review, 0(0), p. 1-30.
summary.iMqr
, plot.iMqr
, predict.iMqr
,
for summary, plotting, and prediction, and plf
and slp
that may be used to define
to be a piecewise linear function and a shifted Legendre polynomial basis, respectively.
##### Using simulated data in all examples ##### NOTE 1: the true quantile and M-quantile functions do not generally coincide ##### NOTE 2: the true M-quantile function is usually unknown, even with simulated data ##### Example 1 n <- 250 x <- runif(n) y <- rnorm(n, 1 + x, 1 + x) # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = beta1(p) = 1 + qnorm(p) # fit the 'true' model: b(p) = (1 , qnorm(p)) m1 <- iMqr(y ~ x, formula.p = ~ I(qnorm(p))) # the fitted M-quantile regression coefficient functions are # beta0(p) = m1$coef[1,1] + m1$coef[1,2]*qnorm(p) # beta1(p) = m1$coef[2,1] + m1$coef[2,2]*qnorm(p) # a basis b(p) = (1, p), i.e., beta(p) is assumed to be a linear function of p m2 <- iMqr(y ~ x, formula.p = ~ p) # a 'rich' basis b(p) = (1, p, p^2, log(p), log(1 - p)) m3 <- iMqr(y ~ x, formula.p = ~ p + I(p^2) + I(log(p)) + I(log(1 - p))) # 'slp' creates an orthogonal spline basis using shifted Legendre polynomials m4 <- iMqr(y ~ x, formula.p = ~ slp(p, k = 3)) # note that this is the default # 'plf' creates the basis of a piecewise linear function m5 <- iMqr(y ~ x, formula.p = ~ plf(p, knots = c(0.1,0.9))) summary(m1) summary(m1, p = c(0.25,0.5,0.75)) par(mfrow = c(1,2)); plot(m1, ask = FALSE) # see the documentation for 'summary.iMqr' and 'plot.iMqr' ##### Example 2 ### excluding coefficients n <- 250 x <- runif(n) qy <- function(p,x){(1 + qnorm(p)) + (1 + log(p))*x} # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = 1 + qnorm(p) # beta1(p) = 1 + log(p) y <- qy(runif(n), x) # to generate y, plug uniform p in qy(p,x) iMqr(y ~ x, formula.p = ~ I(qnorm(p)) + I(log(p))) # I would like to exclude log(p) from beta0(p), and qnorm(p) from beta1(p) # I set to 0 the corresponding entries of 's' s <- rbind(c(1,1,0),c(1,0,1)) iMqr(y ~ x, formula.p = ~ I(qnorm(p)) + I(log(p)), s = s)
##### Using simulated data in all examples ##### NOTE 1: the true quantile and M-quantile functions do not generally coincide ##### NOTE 2: the true M-quantile function is usually unknown, even with simulated data ##### Example 1 n <- 250 x <- runif(n) y <- rnorm(n, 1 + x, 1 + x) # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = beta1(p) = 1 + qnorm(p) # fit the 'true' model: b(p) = (1 , qnorm(p)) m1 <- iMqr(y ~ x, formula.p = ~ I(qnorm(p))) # the fitted M-quantile regression coefficient functions are # beta0(p) = m1$coef[1,1] + m1$coef[1,2]*qnorm(p) # beta1(p) = m1$coef[2,1] + m1$coef[2,2]*qnorm(p) # a basis b(p) = (1, p), i.e., beta(p) is assumed to be a linear function of p m2 <- iMqr(y ~ x, formula.p = ~ p) # a 'rich' basis b(p) = (1, p, p^2, log(p), log(1 - p)) m3 <- iMqr(y ~ x, formula.p = ~ p + I(p^2) + I(log(p)) + I(log(1 - p))) # 'slp' creates an orthogonal spline basis using shifted Legendre polynomials m4 <- iMqr(y ~ x, formula.p = ~ slp(p, k = 3)) # note that this is the default # 'plf' creates the basis of a piecewise linear function m5 <- iMqr(y ~ x, formula.p = ~ plf(p, knots = c(0.1,0.9))) summary(m1) summary(m1, p = c(0.25,0.5,0.75)) par(mfrow = c(1,2)); plot(m1, ask = FALSE) # see the documentation for 'summary.iMqr' and 'plot.iMqr' ##### Example 2 ### excluding coefficients n <- 250 x <- runif(n) qy <- function(p,x){(1 + qnorm(p)) + (1 + log(p))*x} # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = 1 + qnorm(p) # beta1(p) = 1 + log(p) y <- qy(runif(n), x) # to generate y, plug uniform p in qy(p,x) iMqr(y ~ x, formula.p = ~ I(qnorm(p)) + I(log(p))) # I would like to exclude log(p) from beta0(p), and qnorm(p) from beta1(p) # I set to 0 the corresponding entries of 's' s <- rbind(c(1,1,0),c(1,0,1)) iMqr(y ~ x, formula.p = ~ I(qnorm(p)) + I(log(p)), s = s)
Generates such that, for 0 < p < 1,
is a piecewise linear function with slopes
.
plf(p, knots)
plf(p, knots)
p |
a numeric vector of values between 0 and 1. |
knots |
a set of internal knots between 0 and 1. It can be NULL for no internal knots. |
This function permits computing a piecewise linear function on the unit interval. A different slope holds between each pair of knots, and the function is continuous at the knots.
A matrix with one row for each element of p, and length(knots) + 1
columns.
The knots are returned as attr(, "knots")
.
Any linear combination of the basis matrix is a piecewise linear function where
each coefficient represents the slope in the corresponding sub-interval (see ‘Examples’).
This function is typically used within a call to iMqr
.
A piecewise linear function can be used to describe how M-quantile regression coefficients
depend on the order of the quantile.
Paolo Frumento [email protected]
slp
, for shifted Legendre polynomials.
p <- seq(0,1, 0.1) a1 <- plf(p, knots = NULL) # returns p a2 <- plf(p, knots = c(0.2,0.7)) plot(p, 3 + 1*a2[,1] - 1*a2[,2] + 2*a2[,3], type = "l") # intercept = 3; slopes = (1,-1,2)
p <- seq(0,1, 0.1) a1 <- plf(p, knots = NULL) # returns p a2 <- plf(p, knots = c(0.2,0.7)) plot(p, 3 + 1*a2[,1] - 1*a2[,2] + 2*a2[,3], type = "l") # intercept = 3; slopes = (1,-1,2)
Plots M-quantile regression coefficients
as a function of
,
based on a fitted model of class “
iMqr
”.
## S3 method for class 'iMqr' plot(x, conf.int = TRUE, polygon = TRUE, which = NULL, ask = TRUE, ...)
## S3 method for class 'iMqr' plot(x, conf.int = TRUE, polygon = TRUE, which = NULL, ask = TRUE, ...)
x |
an object of class “ |
conf.int |
logical. If TRUE, asymptotic 95% confidence intervals are added to the plot. |
polygon |
logical. If TRUE, confidence intervals are represented by shaded areas via |
which |
an optional numerical vector indicating which coefficient(s) to plot. If which = NULL, all coefficients are plotted. |
ask |
logical. If which = NULL and ask = TRUE (the default), you will be asked interactively which coefficients to plot. |
... |
additional graphical parameters, that can include xlim, ylim, xlab, ylab, col, lwd, cex.lab, cex.axis, axes, frame.plot.
See |
Using iMqr
, each M-quantile regression coefficient is described by a linear
combination of known parametric functions of
. With this command, a plot of
versus
is created.
Paolo Frumento [email protected]
iMqr
for model fitting; summary.iMqr
and predict.iMqr
for model summary and prediction.
# using simulated data n <- 250 x <- runif(n) qy <- function(p,x){p^2 + x*log(p)} # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = p^2 # beta1(p) = log(p) y <- qy(runif(n), x) # to generate y, plug uniform p in qy(p,x) par(mfrow = c(1,2)) plot(iMqr(y ~ x, formula.p = ~ slp(p,3)), ask = FALSE) # flexible fit with shifted Legendre polynomials
# using simulated data n <- 250 x <- runif(n) qy <- function(p,x){p^2 + x*log(p)} # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = p^2 # beta1(p) = log(p) y <- qy(runif(n), x) # to generate y, plug uniform p in qy(p,x) par(mfrow = c(1,2)) plot(iMqr(y ~ x, formula.p = ~ slp(p,3)), ask = FALSE) # flexible fit with shifted Legendre polynomials
Predictions from an object of class “iMqr
”.
## S3 method for class 'iMqr' predict(object, type = c("beta", "CDF", "QF", "sim"), newdata, p, se = TRUE, ...)
## S3 method for class 'iMqr' predict(object, type = c("beta", "CDF", "QF", "sim"), newdata, p, se = TRUE, ...)
object |
an object of class “ |
type |
a character string specifying the type of prediction. See ‘Details’. |
newdata |
an optional data frame in which to look for variables with which to predict. If omitted, the data are used. For type = "CDF", it must include the response variable. Ignored if type = "beta". |
p |
a numeric vector indicating the order(s) of the quantile to predict. Only used if type = "beta" or type = "QF". |
se |
logical. If TRUE (the default), standard errors of the prediction will be computed. Only used if type = "beta" or type = "QF". |
... |
for future methods. |
Using iMqr
, M-quantile regression coefficients
are modeled as parametric functions of
, the order of the quantile.
This implies that the model parameter is not
itself.
The function
predict.iqr
permits computing and other
quantities of interest, as detailed below.
if type = "beta" (the default), is returned at
the supplied value(s) of p. If p is missing, a default p = (0.01, ..., 0.99) is used.
if type = "CDF", the value of the fitted CDF (cumulative distribution function)
and PDF (probability density function) are computed. The CDF value should be
interpreted as the order of the M-quantile that corresponds to the observed y
values,
while the PDF is just the first derivative of the CDF.
if type = "QF", the fitted values , corresponding to the
conditional M-quantile function, are computed at the supplied values of p.
if type = "sim", data are simulated from the fitted model. To simulate the data, the fitted conditional M-quantile function is computed at randomly generated p following a Uniform(0,1) distribution. CAUTION: this generates data assuming that the model describes the quantile function, while in practice it describes M-quantiles.
if type = "beta" a list with one item for each covariate in the model.
Each element of the list is a data frame with columns (p, beta, se, low, up) reporting , its estimated standard error, and the corresponding 95% confidence interval. If se = FALSE, the last three columns are not computed.
if type = "CDF", a two-columns data frame (CDF,PDF).
if type = "QF" and se = FALSE, a data frame with one row for each observation, and one column for each value of p. If se = TRUE, a list of two data frames, fit (predictions) and se.fit (standard errors).
if type = "sim", a vector of simulated data.
Prediction may generate quantile crossing
if the support of the new covariates values supplied in newdata
is different from that of the observed data.
Paolo Frumento [email protected]
iMqr
, for model fitting; summary.iMqr
and plot.iMqr
,
for summarizing and plotting iMqr
objects.
# using simulated data n <- 250 x <- runif(n) y <- rlogis(n, 1 + x, 1 + x) # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = beta1(p) = 1 + log(p/(1 - p)) model <- iMqr(y ~ x, formula.p = ~ I(log(p)) + I(log(1 - p))) # (fit asymmetric logistic distribution) # predict beta(0.25), beta(0.5), beta(0.75) predict(model, type = "beta", p = c(0.25,0.5, 0.75)) # predict the CDF and the PDF at new values of x and y predict(model, type = "CDF", newdata = data.frame(x = c(.1,.2,.3), y = c(1,2,3))) # computes the quantile function at new x, for p = (0.25,0.5,0.75) predict(model, type = "QF", p = c(0.25,0.5,0.75), newdata = data.frame(x = c(.1,.2,.3))) # simulate data from the fitted model ysim <- predict(model, type = "sim") # 'newdata' can be supplied # NOTE: data are generated using the fitted M-quantile function as if # it was a quantile function. This means that the simulated data will # have quantiles (and not M-quantiles) described by the fitted model. # There is no easy way to generate data with a desired M-quantile function.
# using simulated data n <- 250 x <- runif(n) y <- rlogis(n, 1 + x, 1 + x) # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = beta1(p) = 1 + log(p/(1 - p)) model <- iMqr(y ~ x, formula.p = ~ I(log(p)) + I(log(1 - p))) # (fit asymmetric logistic distribution) # predict beta(0.25), beta(0.5), beta(0.75) predict(model, type = "beta", p = c(0.25,0.5, 0.75)) # predict the CDF and the PDF at new values of x and y predict(model, type = "CDF", newdata = data.frame(x = c(.1,.2,.3), y = c(1,2,3))) # computes the quantile function at new x, for p = (0.25,0.5,0.75) predict(model, type = "QF", p = c(0.25,0.5,0.75), newdata = data.frame(x = c(.1,.2,.3))) # simulate data from the fitted model ysim <- predict(model, type = "sim") # 'newdata' can be supplied # NOTE: data are generated using the fitted M-quantile function as if # it was a quantile function. This means that the simulated data will # have quantiles (and not M-quantiles) described by the fitted model. # There is no easy way to generate data with a desired M-quantile function.
Influence function to be passed to iMqr
.
Huber(c = 1.345)
Huber(c = 1.345)
c |
tuning parameter for Huber's influence function. |
These functions are only meant to be used used within a call to iMqr
.
A list with the following items:
psi , psi_tau , psi1_tau , rho_tau
|
define the influence function. |
par |
the parameters of the influence function, e.g., the value of |
name |
a character string indicating the name of the influence function. |
Huber, P. J. (1981). "Robust Statistics", John Wiley and Sons, New York.
# The following are identical: # iMqr(y ~ x, psi = "Huber") # iMqr(y ~ x, psi = Huber) # iMqr(y ~ x, psi = Huber(c = 1.345))
# The following are identical: # iMqr(y ~ x, psi = "Huber") # iMqr(y ~ x, psi = Huber) # iMqr(y ~ x, psi = Huber(c = 1.345))
Computes shifted Legendre polynomials.
slp(p, k = 3, intercept = FALSE)
slp(p, k = 3, intercept = FALSE)
p |
the variable for which to compute the polynomials. Must be 0 <= p <= 1. |
k |
the degree of the polynomial. |
intercept |
logical. If TRUE, the polynomials include the constant term. |
Shifted Legendre polynomials (SLP) are orthogonal polynomial functions in (0,1) that can be used
to build a spline basis, typically within a call to iMqr
.
The constant term is omitted unless intercept = TRUE: for example,
the first two SLP are (2*p - 1, 6*p^2 - 6*p + 1)
,
but slp(p, k = 2)
will only return (2*p, 6*p^2 - 6*p)
.
An object of class “slp
”, i.e.,
a matrix with the same number of rows as p, and with k columns
named slp1, slp2, ...
containing the SLP of the corresponding orders.
The value of k is reported as attribute.
The default for iMqr
is formula.p = ~ slp(p, k = 3)
.
Paolo Frumento [email protected]
Refaat El Attar (2009), Legendre Polynomials and Functions, CreateSpace, ISBN 978-1-4414-9012-4.
plf
, for piecewise linear functions in the unit interval.
p <- seq(0,1,0.1) slp(p, k = 1) # = 2*p slp(p, k = 1, intercept = TRUE) # = 2*p - 1 (this is the true SLP of order 1) slp(p, k = 3) # a linear combination of (p, p^2, p^3), with slp(0,k) = 0
p <- seq(0,1,0.1) slp(p, k = 1) # = 2*p slp(p, k = 1, intercept = TRUE) # = 2*p - 1 (this is the true SLP of order 1) slp(p, k = 3) # a linear combination of (p, p^2, p^3), with slp(0,k) = 0
Summary of an object of class “iMqr
”.
## S3 method for class 'iMqr' summary(object, p, cov = FALSE, ...)
## S3 method for class 'iMqr' summary(object, p, cov = FALSE, ...)
object |
an object of class “ |
p |
an optional vector of quantiles. |
cov |
logical. If TRUE, the covariance matrix of |
... |
for future methods. |
If p is missing, a summary of the fitted model is reported. This includes the estimated coefficients, their standard errors, and other summaries (see ‘Value’). If p is supplied, the M-quantile regression coefficients of order p are extrapolated and summarized.
If p is supplied, a standard summary of the estimated M-quantile regression coefficients is returned for each value of p. If cov = TRUE, the covariance matrix is also reported.
If p is missing (the default), a list with the following items:
converged |
logical value indicating the convergence status. |
n.it |
the number of iterations. |
n |
the number of observations. |
free.par |
the number of free parameters in the model. |
coefficients |
the matrix of estimated coefficients. Each row corresponds to
a covariate, while each column corresponds to an element of |
se |
the estimated standard errors. |
test.x |
Wald test for the covariates. Each row of |
test.p |
Wald test for the building blocks of the quantile function. Each column of |
obj.function |
the minimized loss function. |
call |
the matched call. |
Paolo Frumento [email protected]
iMqr
, for model fitting; predict.iMqr
and plot.iMqr
,
for predicting and plotting objects of class “iMqr
”.
# using simulated data set.seed(1234); n <- 250 x1 <- rexp(n) x2 <- runif(n) qy <- function(p,x){qnorm(p)*(1 + x)} # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = beta1(p) = qnorm(p) y <- qy(runif(n), x1) # to generate y, plug uniform p in qy(p,x) # note that x2 does not enter model <- iMqr(y ~ x1 + x2, formula.p = ~ I(qnorm(p)) + p + I(p^2)) # beta(p) is modeled by linear combinations of b(p) = (1, qnorm(p),p,p^2) summary(model) # interpretation: # beta0(p) = model$coef[1,]*b(p) # beta1(p) = model$coef[2,]*b(p); etc. # x2 and (p, p^2) are not significant summary(model, p = c(0.25, 0.75)) # summary of beta(p) at selected quantiles
# using simulated data set.seed(1234); n <- 250 x1 <- rexp(n) x2 <- runif(n) qy <- function(p,x){qnorm(p)*(1 + x)} # true quantile function: Q(p | x) = beta0(p) + beta1(p)*x, with # beta0(p) = beta1(p) = qnorm(p) y <- qy(runif(n), x1) # to generate y, plug uniform p in qy(p,x) # note that x2 does not enter model <- iMqr(y ~ x1 + x2, formula.p = ~ I(qnorm(p)) + p + I(p^2)) # beta(p) is modeled by linear combinations of b(p) = (1, qnorm(p),p,p^2) summary(model) # interpretation: # beta0(p) = model$coef[1,]*b(p) # beta1(p) = model$coef[2,]*b(p); etc. # x2 and (p, p^2) are not significant summary(model, p = c(0.25, 0.75)) # summary of beta(p) at selected quantiles