ho.bc {NCStats}R Documentation

Constructs a p-value for a bootstrapped hypothesis test.

Description

Computes a bootstrapped p-value from parameter estimates computed in many bootstrap samples.

Usage

ho.bc(bc,bc.col=NULL,bo=0,alt=c("two.sided","less","greater"))

Arguments

bc A matrix containing parameter estimates in columns computed on many different bootstrap samples in rows.
bc.col A number indicating which column of bc contains the parameter estimates to use in the hypothesis test.
bo The null hypothesized parameter value.
alt A string identifying the "direction" of the alternative hypothesis. See details.

Details

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 bc.var that are extreme of the null hypothesized parameter value in param. 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 param.

Value

Returns a matrix with two columns. The first column contains the hypothesized value sent to this function and the second column is the corresponding p-value.

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

boot.case in alr3.

Examples

## Not run, because boot.case takes a great deal of time:
## Should work if copied and pasted into console
## Not run: data(Ecoli)
## Not run: nl1 <- nls(cells~B1/(1+exp(B2+B3*days)),data=Ecoli,start=list(B1=6,B2=7.2,B3=-1.45))
## Not run: library(alr3)
## Not run: nl1.boot <- boot.case(nl1) # requires alr3
## Not run: ho.bc(nl1.boot,1,bo=6,alt="less")

[Package NCStats version 0.0-12 Index]