bootCase: Associated S3 methods for bootCase from car.

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

Description

Provides S3 methods to construct non-parametric bootstrap confidence intervals, hypothesis tests, and plots of the parameter estimates for bootCase objects from the car package.

Usage

1
2
3
4
## S3 method for class 'bootCase'
confint(object, parm = NULL, level = conf.level,
  conf.level = 0.95, plot = FALSE, err.col = "black", err.lwd = 2,
  rows = NULL, cols = NULL, ...)

Arguments

object

A bootCase object.

parm

A number or string that indicates which column of object contains the parameter estimates to use for the confidence interval or hypothesis test.

level

Same as conf.level.

conf.level

A level of confidence as a proportion.

plot

A logical that indicates whether a plot should be constructed. If confint then a histogram of the parm parameters from the bootstrap samples with error bars that illustrate the bootstrapped confidence intervals will be constructed. If codehtest then a histogram of the parm parameters with a vertical line illustrating the bo value will be constructed.

err.col

A single numeric or character that identifies the color for the error bars on the plot.

err.lwd

A single numeric that identifies the line width for the error bars on the plot.

rows

A single numeric that contains the number of rows to use on the graphic.

cols

A single numeric that contains the number of columns to use on the graphic.

...

Additional items to send to functions.

Details

confint finds the two quantiles that have the (1-conf.level)/2 proportion of bootstrapped parameter estimates below and above. This is an approximate 100conf.level% confidence interval.

predict applies a user-supplied function to each row of object and then finds the median and the two quantiles that have the proportion (1-conf.level)/2 of the bootstrapped predictions below and above. The median is returned as the predicted value and the quantiles are returned as an approximate 100conf.level% confidence interval for that prediction.

In htest the “direction” of the alternative hypothesis is identified by a string in the alt= argument. The strings may be "less" for a “less than” alternative, "greater" for a “greater than” alternative, or "two.sided" for a “not equals” alternative (the DEFAULT). In the one-tailed alternatives the p-value is the proportion of bootstrapped parameter estimates in object$coefboot that are extreme of the null hypothesized parameter value in bo. In the two-tailed alternative the p-value is twice the smallest of the proportion of bootstrapped parameter estimates above or below the null hypothesized parameter value in bo.

Value

If object is a matrix, then confint returns a matrix with as many rows as columns (i.e., parameter estimates) in object and two columns of the quantiles that correspond to the approximate confidence interval. If object is a vector, then confint returns a vector with the two quantiles that correspond to the approximate confidence interval.

Author(s)

Derek H. Ogle, dogle@northland.edu

References

S. Weisberg (2005). Applied Linear Regression, third edition. New York: Wiley, Chapters 4 and 11.

See Also

bootCase in car.

Examples

1
2
3
4
5
data(Ecoli)
fnx <- function(days,B1,B2,B3) B1/(1+exp(B2+B3*days))
nl1 <- nls(cells~fnx(days,B1,B2,B3),data=Ecoli,start=list(B1=6,B2=7.2,B3=-1.45))
if (require(car)) bc <- bootCase(nl1,B=99)
if (require(car)) confint(bc,parm=1)

droglenc/TestPackage documentation built on May 15, 2019, 2:51 p.m.