regp2plot:

Usage Arguments Examples

Usage

1
regp2plot(x, y, xout = FALSE, outfun = out, xlab = "Var 1", ylab = "Var 2", zlab = "Var 3", regfun = tsreg, COLOR = FALSE, tick.marks = TRUE, ...)

Arguments

x
y
xout
outfun
xlab
ylab
zlab
regfun
COLOR
tick.marks
...

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
##---- 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, xout = FALSE, outfun = out, xlab = "Var 1", ylab = "Var 2", 
    zlab = "Var 3", regfun = tsreg, COLOR = FALSE, tick.marks = TRUE, 
    ...) 
{
    x = as.matrix(x)
    if (ncol(x) != 2) 
        stop("Argument x must be stored in a matrix with 2 columns.")
    xy <- elimna(cbind(x, y))
    if (xout) {
        flag = outfun(xy[, 1:2])$keep
        xy = xy[flag, ]
    }
    x = xy[, 1:2]
    y = xy[, 3]
    library(scatterplot3d)
    temp <- scatterplot3d(xy, xlab = xlab, ylab = ylab, zlab = zlab, 
        tick.marks = tick.marks)
    vals <- regfun(x, y, ...)$coef
    if (COLOR) 
        temp$plane(vals, col = "blue")
    if (!COLOR) 
        temp$plane(vals)
  }

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