tstsreg:

Usage Arguments Examples

Usage

1
tstsreg(x, y, sc = pbvar, xout = FALSE, outfun = outpro, plotit = FALSE, ...)

Arguments

x
y
sc
xout
outfun
plotit
...

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
##---- 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, sc = pbvar, xout = FALSE, outfun = outpro, plotit = FALSE, 
    ...) 
{
    x <- as.matrix(x)
    xx <- cbind(x, y)
    xx <- elimna(xx)
    x <- xx[, 1:ncol(x)]
    x <- as.matrix(x)
    y <- xx[, ncol(x) + 1]
    x <- as.matrix(x)
    if (xout) {
        x <- as.matrix(x)
        flag <- outfun(x, plotit = plotit, ...)$keep
        x <- x[flag, ]
        y <- y[flag]
        x <- as.matrix(x)
    }
    res = stsreg(x, y, sc = sc)$res
    chk <- abs(res - median(res))/mad(res)
    xx <- x[chk <= 2, ]
    yy <- y[chk <= 2]
    temp <- tsreg(xx, yy)
    list(coef = temp$coef, residuals = temp$res)
  }

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