rrplot2:

Usage Arguments Examples

Usage

1
rrplot2(x, y, nsamps = 7)

Arguments

x
y
nsamps

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, nsamps = 7) 
{
    n <- length(y)
    rmat <- matrix(nrow = n, ncol = 4)
    lsres <- lsfit(x, y)$residuals
    print("got OLS")
    almsres <- lmsreg(x, y)$resid
    print("got ALMS")
    altsres <- ltsreg(x, y)$residuals
    print("got ALTS")
    out <- mba$coef
    mbacoef <- mbareg(x, y, nsamp = nsamps)$coef
    MBARES <- y - mbacoef[1] - x %*% mbacoef[-1]
    print("got MBA")
    rmat[, 1] <- lsres
    rmat[, 2] <- almsres
    rmat[, 3] <- altsres
    rmat[, 4] <- MBARES
    pairs(rmat, labels = c("OLS residuals", "ALMS residuals", 
        "ALTS residuals", "MBA residuals"))
  }

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