Learn R Programming

McSpatial (version 2.0)

qregbmat: Quantile Regression for Multiple Quantiles

Description

Returns estimated coefficients from a series of quantile regressions.

Usage

qregbmat(form,taumat=seq(.10,.90,.10),graphb=TRUE,graph.factor=FALSE, data=NULL)

Arguments

form
Model formula
taumat
Vector of target quantiles. Default: taumat=seq(.10,.90,.10)
graphb
If graphb=TRUE, prints graphs of the coefficient estimates. Default: graphb=TRUE.
graph.factor
If graph.factor=TRUE and graphb=TRUE, prints graphs of the coefficient estimates for any factor variables. Default: graph.factor=TRUE.
data
A data frame containing the data. Default: use data in the current working directory.

Value

Returns the length(taumat) x k matrix of estimated coefficients, where k is the number of explanatory variables.

Details

Estimates a series of quantile regressions using the quantreg packages. The quantiles are listed in taumat. The qregbmat command is intended primarily as a first stage before the qregsim1 or qregsim2 commands.

References

Koenker, Roger. Quantile Regression. New York: Cambridge University Press, 2005.

See Also

qregsim1

qregsim2

qregcpar

qreglwr

Examples

Run this code

par(ask=TRUE)
data(matchdata)
matchdata$age <- matchdata$year - matchdata$yrbuilt 
bmat <- qregbmat(lnprice~lnland+lnbldg+age+factor(year), data=matchdata,
  graph.factor=TRUE)
summary(bmat)

Run the code above in your browser using DataLab