flatQQplot | R Documentation |
Showing multiple ('flat') QQ plots for different quantiles using a heatmap.
flatQQplot( dat, cnum = NULL, vname = NULL, qrfits, qns, maxm = 30, sdevs = 4, filename = NULL, plot.it = TRUE )
dat |
The data matrix. |
cnum |
The selected column number. |
vname |
The selected variable name (if cnum is not specified). |
qrfits |
A list of QR-fitted models. |
qns |
The quantiles. |
maxm |
The maximum number of segments in the partision of the selected variable (default=30) |
sdevs |
Used to determine the ranges for critical values under the null model and thus the range of colors in the heatmap (default= 4). |
filename |
The pdf file to save the plot. Default is NULL (print to the screen.) |
plot.it |
A logical variable used to determine whether to show the diagnostic plot (TRUE). |
data(simdf) qns <- seq(0.1,0.9,by=0.1) qrfits <- list() for (i in 1:length(qns)) { qrfits[[i]] <- QREM(lm,linmod=y~x*x2 +x3, df=simdf, qn=qns[i]) } pvals <- flatQQplot(dat=simdf, cnum = 2, qrfits=qrfits, qns=qns, maxm = 20, plot.it = TRUE) pvals <- flatQQplot(dat=simdf, cnum = 3, qrfits=qrfits, qns=qns, maxm = 20, plot.it = TRUE) pvals <- flatQQplot(dat=simdf, cnum = 4, qrfits=qrfits, qns=qns, maxm = 20, plot.it = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.