eadelR: Murray...

Usage Arguments Examples

View source: R/Scale.R

Usage

1
eadelR(n, s, t, x, y, m, u)

Arguments

n
s
t
x
y
m
u

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
##---- 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 (n, s, t, x, y, m, u) 
{
    if (x == m) {
        xI <- 1
    }
    else {
        xI <- 0
    }
    if (y == m) {
        yI <- 1
    }
    else {
        yI <- 0
    }
    if (max(xI, yI) == 1) {
        delT <- 2
    }
    else {
        delT <- 1
    }
    if (m > max(x, y)) {
        x <- -x
        y <- -y
        m <- -m
        u <- -u
    }
    if (max(x - u, y - u, m - x, m - y) >= 0) {
        out <- 0
    }
    if (delT == 1) {
        out <- eagamma(n, s, t, x, y, m, u)/(1 - exp(-2 * (x - 
            m) * (y - m)/(t - s)))
    }
    if (delT == 2) {
        if (xI * yI == 0) {
            xoy <- max(x, y)
            out <- eadel2(n, s, t, m, xoy, u)
        }
        else {
            out <- 0
        }
    }
    if (out < 0) {
        out <- 0
    }
    if (out > 1) {
        out <- 1
    }
    if ((t - s) == 0) {
        out <- 1
    }
    out
  }

mpoll/scale documentation built on Dec. 9, 2019, 7:15 a.m.