Tplt:

Usage Arguments Examples

Usage

1
Tplt(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
##---- 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) 
{
    olsfit <- y - lsfit(x, y)$resid
    lam <- c(-1, -2/3, -1/2, -1/3, -1/4, 0, 1/4, 1/3, 1/2, 2/3, 
        1)
    xl <- c("Y**(-1)", "Y**(-2/3)", "Y**(-0.5)", "Y**(-1/3)", 
        "Y**(-1/4)", "LOG(Y)", "Y**(1/4)", "Y**(1/3)", "Y**(1/2)", 
        "Y**(2/3)", "Y")
    for (i in 1:length(lam)) {
        if (lam[i] == 0) 
            ytem <- log(y)
        else if (lam[i] == 1) 
            ytem <- y
        else ytem <- (y^lam[i] - 1)/lam[i]
        plot(olsfit, ytem, xlab = "YHAT", ylab = xl[i])
        abline(lsfit(olsfit, ytem)$coef)
        identify(olsfit, ytem)
    }
  }

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