urqCI: Inference for Unconditional Quantile Regression

Description Usage Arguments Details References See Also Examples

Description

Returns a summary list for an Unconditional Quantile Regression Fit.

Usage

1
urqCI(urq,R=20,seed=NULL,colour=NULL,confidence=NULL,graph=TRUE,cluster=NULL,BC=FALSE)

Arguments

urq

an object of class urq.

R

the number of bootstrap replications to be used.

seed

random number generator.

colour

colour of plot: default is lightblue.

confidence

significance level.

graph

boolean, if TRUE a graph is produced. At least two quantiles are needed for plot to work.

cluster

column name of variable to be used in order to obtain cluster robust standard errors and confidence intervals.

BC

plot option: If set to TRUE, Bias-Corrected Bootstrap confidence bands are plotted (black dashed lines), along with the bootstrap median (orange dashed line).

Details

This function provides standard errors and confidence intervals for the Recentered Influence Function regression fit urq. If the cluster option is used, standard errors are cluster robust according to the variable supplied by the user, otherwise observations are assumed to be iid. Inference is obtained though a bayesian bootstrap drawing observation (or cluster) weights from a Dirichlet distribution. If the option graph is TRUE, then a quantile plot is provided showing estimates and confidence intervals (t approximation) or Bias-Corrected (BC) intervals. Confidence intervals using the BC percentile method typically require 1000 or more replications.

References

Rubin, D. B. (1981). The bayesian bootstrap. The annals of statistics, 9(1), 130-134.

Efron, B. and R. J. Tibshirani. Bootstrap methods for standard errors, confidence intervals, and other measures of statistical accuracy. Statistical science (1986): 54-75.

See Also

urq

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
### example for cross-sectional data ###

data(engel)
formula=foodexp ~ income
rifreg=urq(formula=formula,data=engel)
summary=urqCI(urq = rifreg,R = 10,graph = TRUE,seed = 1234)

### example for panel data ###

data(trust)
formula=Trust_in_the_ECB~Trust_in_the_EU+Trust_in_National_Government
cre=~Trust_in_the_EU+Trust_in_National_Government
rif=urq(formula,data=trust,cre=cre,id="countryname")
summary=urqCI(urq = rif,R = 10,graph = TRUE,seed = 1234,cluster="countryname")

Example output

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

Loading required package: gtools
Bootstrapping
Number of replications is small, please consider increasing it.Bootstrapping
Number of replications is small, please consider increasing it.

uqr documentation built on May 2, 2019, 3:43 a.m.