plot.FRBmultireg: Plot Method for Objects of class 'FRBmultireg'

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/plotFRBmultireg.R

Description

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.

Usage

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

Arguments

x

an R 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 p and q the number of explanatory resp. response variables specified, the function by default (i.e. if onepage=TRUE) plots a p by q 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 p and/or q 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 p and/or q 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 (p) of explanatory variables is very large, the function again may show only a selection.

Author(s)

Gert Willems and Ella Roelant

References

See Also

FRBmultiregS, FRBmultiregMM, FRBmultiregGS, summary.FRBmultireg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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:
## Not run: 
plot(Sres, expl=1:6, resp=1:3)
## End(Not run)

#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))

FRB documentation built on May 29, 2017, 5:45 p.m.

Related to plot.FRBmultireg in FRB...