1. Set the location of the dataset in the URL address dialog.
The dataset
for this example is:
http://www.rci.rutgers.edu/~cabrera/DNAMR/hw2.txt
2. Copy the code at the bottom of the paste and paste it into the text box below.
3. Click on the submit button
4. The first line of the code contains the the value for the constant k = 0. You may replace it by a value of your choice in orfer to modify the transformation to log(X-k). Be careful that number the number k has to be less than the minimum of x, otherwise you will take the log of a negative number. One option is k= min(X)* 0.95
##
##
k=0 ##
#
pre.summary <- function(x,k=0,npages=1 ) { # Summary about transformations
p <- ncol(x)
x <- data.frame(x)
pp = ceiling(p/npages)
par(mfcol=c(4,pp))
par(mar=c(3,1,3,1))
nam <- names(x)
nam1 <- paste ("Log(",nam,")",sep="")
lx <- log(x-k)
for( i in 1:p) {
hist(x[[i]],main=nam[i])
qqnorm(x[[i]],main=nam[i])
hist(lx[[i]],main=nam1[i])
qqnorm(lx[[i]],main=nam1[i])
}
invisible() ##
} ###
#
#
min(X)
pre.summary(X,k)
#
#