| ho.bc {NCStats} | R Documentation |
Computes a bootstrapped p-value from parameter estimates computed in many bootstrap samples.
ho.bc(bc,bc.col=NULL,bo=0,alt=c("two.sided","less","greater"))
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. |
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.
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.
Derek H. Ogle, dogle@northland.edu
S. Weisberg (2005). Applied Linear Regression, third edition. New York: Wiley, Chapters 4 and 11.
boot.case in alr3.
## 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")