symviews:

Usage Arguments Examples

Usage

1
symviews(x, Y)

Arguments

x
Y

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
##---- 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 (x, Y) 
{
    x <- as.matrix(x)
    tem <- seq(0.1, 1, 0.1)
    bols <- lsfit(x, Y)$coef
    fit <- x %*% bols[-1]
    temx <- x[fit > median(fit), ]
    temy <- Y[fit > median(fit)]
    out <- cov.mcd(temx)
    center <- out$center
    cov <- out$cov
    rd2 <- mahalanobis(temx, center, cov)
    for (i in 1:10) {
        val <- quantile(rd2, tem[i])
        bhat <- lsfit(temx[rd2 <= val, ], temy[rd2 <= val])$coef
        ESP <- x %*% bhat[-1]
        plot(ESP, Y)
        identify(ESP, Y)
        print(bhat)
    }
  }

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