Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_boxcoxnorm.wasp
Title produced by softwareBox-Cox Normality Plot
Date of computationMon, 08 Dec 2014 15:09:01 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/Dec/08/t1418051366wly5k7y1ofwsp3g.htm/, Retrieved Sun, 19 May 2024 11:38:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=264041, Retrieved Sun, 19 May 2024 11:38:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact76
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Normality Plot] [Q-Q plot extrinsi...] [2014-12-08 15:09:01] [80d519c92fcb7b7b3d91f00690b8e112] [Current]
Feedback Forum

Post a new message
Dataseries X:
50
68
62
54
71
54
65
73
52
84
42
66
65
78
73
75
72
66
70
61
81
71
69
71
72
68
70
68
61
67
76
70
60
77
72
69
71
62
70
64
58
76
52
59
68
76
65
67
59
69
76
63
75
63
60
73
63
70
75
66
63
63
64
70
75
61
60
62
73
61
66
64
59
64
60
56
66
78
53
67
59
66
68
71
66
73
72
71
59
64
66
78
68
73
62
65
68
65
60
71
65
68
64
74
69
76
68
72
67
63
59
73
66
62
69
66
51
56
67
69
57
56
55
63
67
65
47
76
64
68
64
65
71
63
60
68
72
70
61
61
62
71
71
51
56
70
73
76
59
68
48
52
59
60
59
57
79
60
60
59
62
59
61
71
57
66
63
69
58
59
48
66
73
67
61
68
75
62
69
58
60
74
55
62
63
69
58
58
68
72
62
62
65
69
66
72
62
75
58
66
55
47
72
62
64
64
19
50
68
70
79
69
71
48
66
73
74
66
71
74
78
75
53
60
50
70
69
65
78
78
59
72
70
63
63
71
74
67
66
62
80
73
67
61
73
74
32
69
69
84
64
58
60
59
78
57
60
68
68
73
69
67
60
65
66
74
81
72
55
49
74
53
64
65
57
51
80
67
70
74
75
70
69
65
55
71
65
69
48
69
68
74
67
65
63
74
39
68
69
68
63
67
70
68
66
70
78
59
62
75
74
73
62
69
65
67
73
52
61
53
63
78
65
77
69
68
76
63
41
76
67
69
59
73
72
52
65
63
78
56
68
56
64
68
75
67
55
73
66
75
77
65
75
57
61
71
72
62
66
66
63
60
64
74
59
71
69
63
73
55
77
70
64
78
60
66
77
68
78
68
60
65
64
69
72
50
72
71
80
74
64
69
76
75
79
73
60
76
55
53
62
69
78
68
67
75
59
73
70
59
64
63
67
58
71
79
53
76
66
64
57
67
72
58
74
57
62
74
54
62
66
64
74
71
66
66
63
65
70
66
66
78
77
72
65
67
72
58
84
67
84
58
63
75
55
72
58
69
54
58
67
77
80
67
75
71
72
75
79
76
72
81
52
76
60
72
77
64
67
72
79
40
71
73
75
70
66
66
73
74
58
51
75
70
50
64
77




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=264041&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=264041&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=264041&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







Box-Cox Normality Plot
# observations x497
maximum correlation0.0996305353216871
optimal lambda2

\begin{tabular}{lllllllll}
\hline
Box-Cox Normality Plot \tabularnewline
# observations x & 497 \tabularnewline
maximum correlation & 0.0996305353216871 \tabularnewline
optimal lambda & 2 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=264041&T=1

[TABLE]
[ROW][C]Box-Cox Normality Plot[/C][/ROW]
[ROW][C]# observations x[/C][C]497[/C][/ROW]
[ROW][C]maximum correlation[/C][C]0.0996305353216871[/C][/ROW]
[ROW][C]optimal lambda[/C][C]2[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=264041&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=264041&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Box-Cox Normality Plot
# observations x497
maximum correlation0.0996305353216871
optimal lambda2



Parameters (Session):
par1 = Full Box-Cox transform ; par2 = -2 ; par3 = 2 ; par4 = 0 ; par5 = No ;
Parameters (R input):
par1 = Full Box-Cox transform ; par2 = -2 ; par3 = 2 ; par4 = 0 ; par5 = No ;
R code (references can be found in the software module):
par2 <- abs(as.numeric(par2)*100)
par3 <- as.numeric(par3)*100
if(par4=='') par4 <- 0
par4 <- as.numeric(par4)
numlam <- par2 + par3 + 1
x <- x + par4
n <- length(x)
c <- array(NA,dim=c(numlam))
l <- array(NA,dim=c(numlam))
mx <- -1
mxli <- -999
for (i in 1:numlam)
{
l[i] <- (i-par2-1)/100
if (l[i] != 0)
{
if (par1 == 'Full Box-Cox transform') x1 <- (x^l[i] - 1) / l[i]
if (par1 == 'Simple Box-Cox transform') x1 <- x^l[i]
} else {
x1 <- log(x)
}
c[i] <- cor(qnorm(ppoints(x), mean=0, sd=1),x1)
if (mx < c[i])
{
mx <- c[i]
mxli <- l[i]
x1.best <- x1
}
}
c
mx
mxli
x1.best
if (mxli != 0)
{
if (par1 == 'Full Box-Cox transform') x1 <- (x^mxli - 1) / mxli
if (par1 == 'Simple Box-Cox transform') x1 <- x^mxli
} else {
x1 <- log(x)
}
bitmap(file='test1.png')
plot(l,c,main='Box-Cox Normality Plot', xlab='Lambda',ylab='correlation')
mtext(paste('Optimal Lambda =',mxli))
grid()
dev.off()
bitmap(file='test2.png')
hist(x,main='Histogram of Original Data',xlab='X',ylab='frequency')
grid()
dev.off()
bitmap(file='test3.png')
hist(x1,main='Histogram of Transformed Data', xlab='X',ylab='frequency')
grid()
dev.off()
bitmap(file='test4.png')
qqnorm(x)
qqline(x)
grid()
mtext('Original Data')
dev.off()
bitmap(file='test5.png')
qqnorm(x1)
qqline(x1)
grid()
mtext('Transformed Data')
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Box-Cox Normality Plot',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'# observations x',header=TRUE)
a<-table.element(a,n)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'maximum correlation',header=TRUE)
a<-table.element(a,mx)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'optimal lambda',header=TRUE)
a<-table.element(a,mxli)
a<-table.row.end(a)
if(mx<0) {
a<-table.row.start(a)
a<-table.element(a,'Warning: maximum correlation is negative! The Box-Cox transformation must not be used.',2)
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
if(par5=='Yes') {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Obs.',header=T)
a<-table.element(a,'Original',header=T)
a<-table.element(a,'Transformed',header=T)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i)
a<-table.element(a,x[i])
a<-table.element(a,x1.best[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
}