Mqrcm (version 1.0)

Mqrcm-package: M-Quantile Regression Coefficients Modeling

Description

This package implements Frumento and Salvati (2018) 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.

Arguments

Details

Package: Mqrcm
Type: Package
Version: 1.0
Date: 2018-08-02
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.

References

Frumento, P., and Salvati, N. (2018). Parametric modeling of M-quantile regression coefficient functions with application to small area estimation [forthcoming].

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab