ksolve.bt:

Usage Arguments Examples

Usage

1
ksolve.bt(d, p, c1, M, b0)

Arguments

d
p
c1
M
b0

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (d, p, c1, M, b0) 
{
    k <- 1
    iter <- 1
    crit <- 100
    eps <- 1e-05
    while ((crit > eps) & (iter < 100)) {
        k.old <- k
        fk <- mean(rho.bt(d/k, c1, M)) - b0
        fkp <- -mean(psi.bt(d/k, c1, M) * d/k^2)
        k <- k - fk/fkp
        if (k < k.old/2) 
            k <- k.old/2
        if (k > k.old * 1.5) 
            k <- k.old * 1.5
        crit <- abs(fk)
        iter <- iter + 1
    }
    return(k)
  }

musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.