plot.scaleboot {scaleboot}R Documentation

Plot Diagnostics for Multiscale Bootstrap

Description

plot method for class "scaleboot".

Usage


## S3 method for class 'scaleboot'
plot(x, models=NULL, select=NULL, sort.by=c("aic","none"),
     k=NULL, s=NULL, sp=NULL, lambda=NULL, bpk=NULL,
     xval = c("square", "inverse","sigma"),
     yval = c("psi", "zvalue", "pvalue"), xlab = NULL,
     ylab = NULL,log.xy = "", xlim = NULL, ylim = NULL,
     add = F, length.x = 300, main=NULL,
     col =1:6, lty = 1:5, lwd = par("lwd"), ex.pch=2:7,
     pch = 1, cex = 1, pt.col = col[1],pt.lwd = lwd[1],
     legend.x = NULL, inset = 0.1, cex.legend=1,...)

## S3 method for class 'summary.scaleboot'
plot(x, select="average",
     k=x$parex$k,s=x$parex$s,sp=x$parex$sp,lambda=x$parex$lambda, ...)


## S3 method for class 'scalebootv'
plot(x,models=attr(x,"models"),sort.by="none",...)

## S3 method for class 'summary.scalebootv'
plot(x, select="average",...)


## S3 method for class 'scaleboot'
lines(x,z,models=names(x$fi), k=NULL,s=NULL,sp=NULL,lambda=NULL,
      bpk=NULL, length.x=z$length.x, col=z$col,lty=z$lty,lwd=z$lwd,... )

sblegend(x="topright",y=NULL,z,inset=0.1,...)

sbplotbeta(beta, p=0.05, col.contour=c("blue","red","green"),
                     drawcontours = TRUE, drawlabels = TRUE,
                     labcex=1,length=100, cex=1, col="black",
                     xlim=NULL, ylim=NULL, lim.countourexpand=0 ) 

Arguments

x

an object used to select a method. For sblegend, x is a numeric or character such as "lefttop" or "righttop", which is passed to legend.

models

character vector of model names. Numeric is also allowed.

select

"average", "best", or one of the fitted models.

sort.by

"aic" or "none".

k

k for extrapolation.

s

s for extrapolation.

sp

sp for extrapolation.

lambda

a numeric of specifying the type of p-values; Bayesian (lambda=0) Frequentist (lambda=1).

bpk

(experimental for 2-step bootstrap)

xval

specifies x-axis. "square" for \sigma^2, "inverse" for 1/\sigma, "sigma" for \sigma.

yval

specifies y-axis. "zvalue" for \psi(\sigma^2|\beta)/\sigma or qnorm(1-bp[i]), "pvalue" for 1-\Phi(\psi(\sigma^2|\beta)/\sigma) or bp[i], "psi" for \psi(\sigma^2|\beta) or sqrt(sa[i])*qnorm(1-bp[i]).

xlab

label for x-axis.

ylab

label for y-axis.

log.xy

character to specify log-scale. "", "x", "y", or "xy".

xlim

range for x-axis.

ylim

range for y-axis.

add

logical for adding another plot.

length.x

the number of segments to draw curves.

main

for title.

col

color for model curves.

lty

lty for model curves.

lwd

lwd for model curves.

ex.pch

pch for extrapolation.

pch

pch for bp points.

cex

cex for bp points.

pt.col

col for bp points.

pt.lwd

lwd for bp points.

legend.x

passed to sblegend as the first argument.

...

further arguments passed to or from other methods.

z

output from previous plot.scaleboot.

y

numeric passed to legend.

inset

inset distance from the margins, which is passed to legend.

cex.legend

cex for legend

beta

matrix of beta values. beta[,1] is beta0, beta[,2] is beta1.

p

significance level for drawing contour lines.

col.contour

colors for SI, AU, BP.

drawcontours

draw contours when TRUE.

drawlabels

draw labels at contours when TRUE.

labcex

cex for contours.

length

grid size for drawing contours.

lim.countourexpand

expand contour plotting region

Details

The plot method plots bootstrap probabilities and calls the lines method, which draws fitted curves for models.

Author(s)

Hidetoshi Shimodaira

See Also

sbfit, sbphylo.

Examples

data(mam15)
## a single plot
a <- mam15.relltest[["t4"]] # an object of class "scaleboot"
plot(a,legend="topleft") # x=sigma^2, y=psi
plot(a,xval="inverse",yval="zvalue",
     legend="topleft") # x=1/sigma, y=z-value
plot(a,xval="sigma",log="x",yval="pvalue",
     legend="topleft") # x=log(sigma), y=probability
## plot of extrapolation
plot(summary(a),legend="topleft")
## multiple plots
b <- mam15.relltest[1:15] # an object of class "scalebootv"
plot(b) # x=sigma^2, y=psi

[Package scaleboot version 1.0-1 Index]