plot.FRBmultireg function

Plot Method for Objects of class 'FRBmultireg'

Plot Method for Objects of class 'FRBmultireg'

Plot function for objects of class FRBmultireg. It produces histograms for the bootstrap estimates for all (or a selection) of the regression coefficients, based on Fast and Robust Bootstrap and with visualization of bootstrap confidence limits.

## S3 method for class 'FRBmultireg' plot(x, expl, resp, confmethod = c("BCA","basic"), onepage = TRUE, ...)

Arguments

  • x: an object of class FRBmultireg, typically created by FRBmultiregS, FRBmultiregMM or FRBmultiregGS
  • expl: optional; vector specifying the explanatory variables to be shown (either by index or by variable name)
  • resp: optional; vector specifying the response variables to be shown (either by index or by variable name)
  • confmethod: which kind of bootstrap confidence intervals to be displayed: 'BCA'= bias corrected and accelerated method, 'basic'= basic bootstrap method
  • onepage: logical: if TRUE, all requested histograms are plotted on one page; if FALSE, separate pages are used for each response variable
  • ...: potentially more arguments to be passed

Details

With pp and qq the number of explanatory resp. response variables specified, the function by default (i.e. if onepage=TRUE) plots a pp by qq matrix of histograms, showing the bootstrap recalculations of the corresponding entry in the regression coefficient matrix as provided in x. The original estimates for the coefficients are indicated by dotted lines, while the solid lines are the bootstrap confidence limits. In case the interval does not contain zero, the plot title is printed in red and a star is added, indicating significance.

However, if pp and/or qq are large, the histograms may not fit on the page and an attempt to do it may result in an error. Therefore, the function first tries whether it fits (the outcome is platform-dependent), and if not it reduces pp and/or qq until all plots do fit on the page. Hence, only a selection may be shown and the user is given a warning in that case.

If onepage=FALSE, separate pages are used for each response variable and the user is prompted for page change. In case the number (pp) of explanatory variables is very large, the function again may show only a selection.

Returns

Returns invisibly the first argument.

References

  • S. Van Aelst and G. Willems (2005). Multivariate regression S-estimators for robust estimation and inference. Statistica Sinica, 15 , 981-1001.
  • S. Van Aelst and G. Willems (2013), Fast and robust bootstrap for multivariate inference: The R package FRB. Journal of Statistical Software, 53 (3), 1--32. tools:::Rd_expr_doi("10.18637/jss.v053.i03") .

Author(s)

Gert Willems and Ella Roelant

See Also

FRBmultiregS, FRBmultiregMM, FRBmultiregGS, summary.FRBmultireg

Examples

data(schooldata) school.x <- data.matrix(schooldata[,1:5]) school.y <- data.matrix(schooldata[,6:8]) Sres <- FRBmultiregS(school.x, school.y, R=999, bdp = 0.25, conf = 0.99) plot(Sres) ## the plot command above selected a subset, since otherwise an error may occur; ## as may happen when you explicitely ask for all coefficients to be plotted on one page: plot(Sres, expl=1:6, resp=1:3) ## use separate pages for each response in case of many covariates: plot(Sres, onepage=FALSE) ## perhaps specify some specific variables of interest: plot(Sres, expl=c("education", "occupation"), resp=c("selfesteem","reading")) ## or (the same): plot(Sres, expl=2:3, resp=c(3,1))
  • Maintainer: Valentin Todorov
  • License: GPL (>= 3)
  • Last published: 2024-10-07

Useful links