Description Usage Arguments Value Author(s) Examples
Implements basic bisection search for root finding. In contrast to uniroot this can also deal with the case where the result of fun
is binary - in this case the bisect
finds the changepoint.
1 |
lower |
lower bound of search range |
upper |
upper bound of search range |
fun |
function whose root is to be found |
tol |
error tolerance |
... |
additional arguments to be passed to the function |
root
float
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | set.seed(5449219)
x <- rnorm_cont(16,25,8,cshift=0,csd=24)
y <- rnorm_cont(16,19,8,cshift=0,csd=24)
cond_power_rule_norm_ts(x[1:8],y[1:8],delta=6,target=.8,rob_var=F)
nE <- cond_power_rule_norm_ts(x[1:8],y[1:8],delta=6,target=.8,rob_var=T)
xE <- rnorm_cont(nE-16,25,8,cshift=0,csd=24)
yE <- rnorm_cont(nE-16,19,8,cshift=0,csd=24)
combtest <- function(delta,alpha){
adaptive_invnormtest_2s(c(y,yE)+delta,c(x,xE),8,16,nE,alpha=alpha)
}
bisect(-10, 10, combtest, alpha = 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.