Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_boxcoxnorm.wasp
Title produced by softwareBox-Cox Normality Plot
Date of computationTue, 10 Feb 2015 21:24:39 +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/2015/Feb/10/t14236035598yx471ljf6hhk1p.htm/, Retrieved Wed, 22 May 2024 00:18:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=276985, Retrieved Wed, 22 May 2024 00:18:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact111
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Normality Plot] [Temperatura] [2015-02-10 21:24:39] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
36
36
36
36
36
37.5
36.5
36
36.5
36.6
36
36.6
36.6
36.5
36.6
36.6
36.5
36.5
36.6
36
36
36
36
36
36
37
36
36.9
36.9
36
33.6
34.6
37.1
36.9
37.4
36.6
37
37.5
37.5
37
36.9
36.9
36
36.5
36
37.1
36
36.6
37
37
36
37.9
39.1
38.1
38.5
38
38
37.9
37.6
37
37
37.6
37
36.5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ yule.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 & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=276985&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=276985&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=276985&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 time2 seconds
R Server'George Udny Yule' @ yule.wessa.net







Box-Cox Normality Plot
# observations x64
maximum correlation0.463981327171147
optimal lambda2

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=276985&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 x64
maximum correlation0.463981327171147
optimal lambda2







Obs.OriginalTransformed
136647.5
236647.5
336647.5
436647.5
536647.5
637.5702.625
736.5665.625
836647.5
936.5665.625
1036.6669.28
1136647.5
1236.6669.28
1336.6669.28
1436.5665.625
1536.6669.28
1636.6669.28
1736.5665.625
1836.5665.625
1936.6669.28
2036647.5
2136647.5
2236647.5
2336647.5
2436647.5
2536647.5
2637684
2736647.5
2836.9680.305
2936.9680.305
3036647.5
3133.6563.98
3234.6598.08
3337.1687.705
3436.9680.305
3537.4698.88
3636.6669.28
3737684
3837.5702.625
3937.5702.625
4037684
4136.9680.305
4236.9680.305
4336647.5
4436.5665.625
4536647.5
4637.1687.705
4736647.5
4836.6669.28
4937684
5037684
5136647.5
5237.9717.705
5339.1763.905
5438.1725.305
5538.5740.625
5638721.5
5738721.5
5837.9717.705
5937.6706.38
6037684
6137684
6237.6706.38
6337684
6436.5665.625

\begin{tabular}{lllllllll}
\hline
Obs. & Original & Transformed \tabularnewline
1 & 36 & 647.5 \tabularnewline
2 & 36 & 647.5 \tabularnewline
3 & 36 & 647.5 \tabularnewline
4 & 36 & 647.5 \tabularnewline
5 & 36 & 647.5 \tabularnewline
6 & 37.5 & 702.625 \tabularnewline
7 & 36.5 & 665.625 \tabularnewline
8 & 36 & 647.5 \tabularnewline
9 & 36.5 & 665.625 \tabularnewline
10 & 36.6 & 669.28 \tabularnewline
11 & 36 & 647.5 \tabularnewline
12 & 36.6 & 669.28 \tabularnewline
13 & 36.6 & 669.28 \tabularnewline
14 & 36.5 & 665.625 \tabularnewline
15 & 36.6 & 669.28 \tabularnewline
16 & 36.6 & 669.28 \tabularnewline
17 & 36.5 & 665.625 \tabularnewline
18 & 36.5 & 665.625 \tabularnewline
19 & 36.6 & 669.28 \tabularnewline
20 & 36 & 647.5 \tabularnewline
21 & 36 & 647.5 \tabularnewline
22 & 36 & 647.5 \tabularnewline
23 & 36 & 647.5 \tabularnewline
24 & 36 & 647.5 \tabularnewline
25 & 36 & 647.5 \tabularnewline
26 & 37 & 684 \tabularnewline
27 & 36 & 647.5 \tabularnewline
28 & 36.9 & 680.305 \tabularnewline
29 & 36.9 & 680.305 \tabularnewline
30 & 36 & 647.5 \tabularnewline
31 & 33.6 & 563.98 \tabularnewline
32 & 34.6 & 598.08 \tabularnewline
33 & 37.1 & 687.705 \tabularnewline
34 & 36.9 & 680.305 \tabularnewline
35 & 37.4 & 698.88 \tabularnewline
36 & 36.6 & 669.28 \tabularnewline
37 & 37 & 684 \tabularnewline
38 & 37.5 & 702.625 \tabularnewline
39 & 37.5 & 702.625 \tabularnewline
40 & 37 & 684 \tabularnewline
41 & 36.9 & 680.305 \tabularnewline
42 & 36.9 & 680.305 \tabularnewline
43 & 36 & 647.5 \tabularnewline
44 & 36.5 & 665.625 \tabularnewline
45 & 36 & 647.5 \tabularnewline
46 & 37.1 & 687.705 \tabularnewline
47 & 36 & 647.5 \tabularnewline
48 & 36.6 & 669.28 \tabularnewline
49 & 37 & 684 \tabularnewline
50 & 37 & 684 \tabularnewline
51 & 36 & 647.5 \tabularnewline
52 & 37.9 & 717.705 \tabularnewline
53 & 39.1 & 763.905 \tabularnewline
54 & 38.1 & 725.305 \tabularnewline
55 & 38.5 & 740.625 \tabularnewline
56 & 38 & 721.5 \tabularnewline
57 & 38 & 721.5 \tabularnewline
58 & 37.9 & 717.705 \tabularnewline
59 & 37.6 & 706.38 \tabularnewline
60 & 37 & 684 \tabularnewline
61 & 37 & 684 \tabularnewline
62 & 37.6 & 706.38 \tabularnewline
63 & 37 & 684 \tabularnewline
64 & 36.5 & 665.625 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=276985&T=2

[TABLE]
[ROW][C]Obs.[/C][C]Original[/C][C]Transformed[/C][/ROW]
[ROW][C]1[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]2[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]3[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]4[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]5[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]6[/C][C]37.5[/C][C]702.625[/C][/ROW]
[ROW][C]7[/C][C]36.5[/C][C]665.625[/C][/ROW]
[ROW][C]8[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]9[/C][C]36.5[/C][C]665.625[/C][/ROW]
[ROW][C]10[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]11[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]12[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]13[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]14[/C][C]36.5[/C][C]665.625[/C][/ROW]
[ROW][C]15[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]16[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]17[/C][C]36.5[/C][C]665.625[/C][/ROW]
[ROW][C]18[/C][C]36.5[/C][C]665.625[/C][/ROW]
[ROW][C]19[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]20[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]21[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]22[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]23[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]24[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]25[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]26[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]27[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]28[/C][C]36.9[/C][C]680.305[/C][/ROW]
[ROW][C]29[/C][C]36.9[/C][C]680.305[/C][/ROW]
[ROW][C]30[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]31[/C][C]33.6[/C][C]563.98[/C][/ROW]
[ROW][C]32[/C][C]34.6[/C][C]598.08[/C][/ROW]
[ROW][C]33[/C][C]37.1[/C][C]687.705[/C][/ROW]
[ROW][C]34[/C][C]36.9[/C][C]680.305[/C][/ROW]
[ROW][C]35[/C][C]37.4[/C][C]698.88[/C][/ROW]
[ROW][C]36[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]37[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]38[/C][C]37.5[/C][C]702.625[/C][/ROW]
[ROW][C]39[/C][C]37.5[/C][C]702.625[/C][/ROW]
[ROW][C]40[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]41[/C][C]36.9[/C][C]680.305[/C][/ROW]
[ROW][C]42[/C][C]36.9[/C][C]680.305[/C][/ROW]
[ROW][C]43[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]44[/C][C]36.5[/C][C]665.625[/C][/ROW]
[ROW][C]45[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]46[/C][C]37.1[/C][C]687.705[/C][/ROW]
[ROW][C]47[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]48[/C][C]36.6[/C][C]669.28[/C][/ROW]
[ROW][C]49[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]50[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]51[/C][C]36[/C][C]647.5[/C][/ROW]
[ROW][C]52[/C][C]37.9[/C][C]717.705[/C][/ROW]
[ROW][C]53[/C][C]39.1[/C][C]763.905[/C][/ROW]
[ROW][C]54[/C][C]38.1[/C][C]725.305[/C][/ROW]
[ROW][C]55[/C][C]38.5[/C][C]740.625[/C][/ROW]
[ROW][C]56[/C][C]38[/C][C]721.5[/C][/ROW]
[ROW][C]57[/C][C]38[/C][C]721.5[/C][/ROW]
[ROW][C]58[/C][C]37.9[/C][C]717.705[/C][/ROW]
[ROW][C]59[/C][C]37.6[/C][C]706.38[/C][/ROW]
[ROW][C]60[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]61[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]62[/C][C]37.6[/C][C]706.38[/C][/ROW]
[ROW][C]63[/C][C]37[/C][C]684[/C][/ROW]
[ROW][C]64[/C][C]36.5[/C][C]665.625[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=276985&T=2

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

As an alternative you can also use a QR Code:  

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

Obs.OriginalTransformed
136647.5
236647.5
336647.5
436647.5
536647.5
637.5702.625
736.5665.625
836647.5
936.5665.625
1036.6669.28
1136647.5
1236.6669.28
1336.6669.28
1436.5665.625
1536.6669.28
1636.6669.28
1736.5665.625
1836.5665.625
1936.6669.28
2036647.5
2136647.5
2236647.5
2336647.5
2436647.5
2536647.5
2637684
2736647.5
2836.9680.305
2936.9680.305
3036647.5
3133.6563.98
3234.6598.08
3337.1687.705
3436.9680.305
3537.4698.88
3636.6669.28
3737684
3837.5702.625
3937.5702.625
4037684
4136.9680.305
4236.9680.305
4336647.5
4436.5665.625
4536647.5
4637.1687.705
4736647.5
4836.6669.28
4937684
5037684
5136647.5
5237.9717.705
5339.1763.905
5438.1725.305
5538.5740.625
5638721.5
5738721.5
5837.9717.705
5937.6706.38
6037684
6137684
6237.6706.38
6337684
6436.5665.625



Parameters (Session):
par1 = Full Box-Cox transform ; par2 = -2 ; par3 = 2 ; par4 = 0 ; par5 = Yes ;
Parameters (R input):
par1 = Full Box-Cox transform ; par2 = -2 ; par3 = 2 ; par4 = 0 ; par5 = Yes ;
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')
}