summary.iMqr | R Documentation |
Summary of an object of class “iMqr
”.
## 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 paolo.frumento@unipi.it
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.