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 computationTue, 02 Dec 2014 17:03:24 +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/02/t141753981797yypda3tf9lst9.htm/, Retrieved Thu, 16 May 2024 06:14:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=262792, Retrieved Thu, 16 May 2024 06:14:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact59
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Normality Plot] [] [2014-12-02 17:03:24] [003c997d057e54927bd887526d955d96] [Current]
Feedback Forum

Post a new message
Dataseries X:
655362
873127
1107897
1555964
1671159
1493308
2957796
2638691
1305669
1280496
921900
867888
652586
913831
1108544
1555827
1699283
1509458
3268975
2425016
1312703
1365498
934453
775019
651142
843192
1146766
1652601
1465906
1652734
2922334
2702805
1458956
1410363
1019279
936574
708917
885295
1099663
1576220
1487870
1488635
2882530
2677026
1404398
1344370
936865
872705
628151
953712
1160384
1400618
1661511
1495347
2918786
2775677
1407026
1370199
964526
850851
683118
847224
1073256
1514326
1503734
1507712
2865698
2788128
1391596
1366378
946295
859626




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=262792&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'Herman Ole Andreas Wold' @ wold.wessa.net







Box-Cox Normality Plot
# observations x72
maximum correlation0.0764328965178881
optimal lambda-2

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=262792&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 x72
maximum correlation0.0764328965178881
optimal lambda-2







Obs.OriginalTransformed
16553620.499999999998836
28731270.499999999999344
311078970.499999999999593
415559640.499999999999793
516711590.499999999999821
614933080.499999999999776
729577960.499999999999943
826386910.499999999999928
913056690.499999999999707
1012804960.499999999999695
119219000.499999999999412
128678880.499999999999336
136525860.499999999998826
149138310.499999999999401
1511085440.499999999999593
1615558270.499999999999793
1716992830.499999999999827
1815094580.499999999999781
1932689750.499999999999953
2024250160.499999999999915
2113127030.49999999999971
2213654980.499999999999732
239344530.499999999999427
247750190.499999999999168
256511420.499999999998821
268431920.499999999999297
2711467660.49999999999962
2816526010.499999999999817
2914659060.499999999999767
3016527340.499999999999817
3129223340.499999999999941
3227028050.499999999999932
3314589560.499999999999765
3414103630.499999999999749
3510192790.499999999999519
369365740.49999999999943
377089170.499999999999005
388852950.499999999999362
3910996630.499999999999586
4015762200.499999999999799
4114878700.499999999999774
4214886350.499999999999774
4328825300.49999999999994
4426770260.49999999999993
4514043980.499999999999746
4613443700.499999999999723
479368650.49999999999943
488727050.499999999999344
496281510.499999999998733
509537120.49999999999945
5111603840.499999999999629
5214006180.499999999999745
5316615110.499999999999819
5414953470.499999999999776
5529187860.499999999999941
5627756770.499999999999935
5714070260.499999999999747
5813701990.499999999999734
599645260.499999999999463
608508510.499999999999309
616831180.499999999998929
628472240.499999999999303
6310732560.499999999999566
6415143260.499999999999782
6515037340.499999999999779
6615077120.49999999999978
6728656980.499999999999939
6827881280.499999999999936
6913915960.499999999999742
7013663780.499999999999732
719462950.499999999999442
728596260.499999999999323

\begin{tabular}{lllllllll}
\hline
Obs. & Original & Transformed \tabularnewline
1 & 655362 & 0.499999999998836 \tabularnewline
2 & 873127 & 0.499999999999344 \tabularnewline
3 & 1107897 & 0.499999999999593 \tabularnewline
4 & 1555964 & 0.499999999999793 \tabularnewline
5 & 1671159 & 0.499999999999821 \tabularnewline
6 & 1493308 & 0.499999999999776 \tabularnewline
7 & 2957796 & 0.499999999999943 \tabularnewline
8 & 2638691 & 0.499999999999928 \tabularnewline
9 & 1305669 & 0.499999999999707 \tabularnewline
10 & 1280496 & 0.499999999999695 \tabularnewline
11 & 921900 & 0.499999999999412 \tabularnewline
12 & 867888 & 0.499999999999336 \tabularnewline
13 & 652586 & 0.499999999998826 \tabularnewline
14 & 913831 & 0.499999999999401 \tabularnewline
15 & 1108544 & 0.499999999999593 \tabularnewline
16 & 1555827 & 0.499999999999793 \tabularnewline
17 & 1699283 & 0.499999999999827 \tabularnewline
18 & 1509458 & 0.499999999999781 \tabularnewline
19 & 3268975 & 0.499999999999953 \tabularnewline
20 & 2425016 & 0.499999999999915 \tabularnewline
21 & 1312703 & 0.49999999999971 \tabularnewline
22 & 1365498 & 0.499999999999732 \tabularnewline
23 & 934453 & 0.499999999999427 \tabularnewline
24 & 775019 & 0.499999999999168 \tabularnewline
25 & 651142 & 0.499999999998821 \tabularnewline
26 & 843192 & 0.499999999999297 \tabularnewline
27 & 1146766 & 0.49999999999962 \tabularnewline
28 & 1652601 & 0.499999999999817 \tabularnewline
29 & 1465906 & 0.499999999999767 \tabularnewline
30 & 1652734 & 0.499999999999817 \tabularnewline
31 & 2922334 & 0.499999999999941 \tabularnewline
32 & 2702805 & 0.499999999999932 \tabularnewline
33 & 1458956 & 0.499999999999765 \tabularnewline
34 & 1410363 & 0.499999999999749 \tabularnewline
35 & 1019279 & 0.499999999999519 \tabularnewline
36 & 936574 & 0.49999999999943 \tabularnewline
37 & 708917 & 0.499999999999005 \tabularnewline
38 & 885295 & 0.499999999999362 \tabularnewline
39 & 1099663 & 0.499999999999586 \tabularnewline
40 & 1576220 & 0.499999999999799 \tabularnewline
41 & 1487870 & 0.499999999999774 \tabularnewline
42 & 1488635 & 0.499999999999774 \tabularnewline
43 & 2882530 & 0.49999999999994 \tabularnewline
44 & 2677026 & 0.49999999999993 \tabularnewline
45 & 1404398 & 0.499999999999746 \tabularnewline
46 & 1344370 & 0.499999999999723 \tabularnewline
47 & 936865 & 0.49999999999943 \tabularnewline
48 & 872705 & 0.499999999999344 \tabularnewline
49 & 628151 & 0.499999999998733 \tabularnewline
50 & 953712 & 0.49999999999945 \tabularnewline
51 & 1160384 & 0.499999999999629 \tabularnewline
52 & 1400618 & 0.499999999999745 \tabularnewline
53 & 1661511 & 0.499999999999819 \tabularnewline
54 & 1495347 & 0.499999999999776 \tabularnewline
55 & 2918786 & 0.499999999999941 \tabularnewline
56 & 2775677 & 0.499999999999935 \tabularnewline
57 & 1407026 & 0.499999999999747 \tabularnewline
58 & 1370199 & 0.499999999999734 \tabularnewline
59 & 964526 & 0.499999999999463 \tabularnewline
60 & 850851 & 0.499999999999309 \tabularnewline
61 & 683118 & 0.499999999998929 \tabularnewline
62 & 847224 & 0.499999999999303 \tabularnewline
63 & 1073256 & 0.499999999999566 \tabularnewline
64 & 1514326 & 0.499999999999782 \tabularnewline
65 & 1503734 & 0.499999999999779 \tabularnewline
66 & 1507712 & 0.49999999999978 \tabularnewline
67 & 2865698 & 0.499999999999939 \tabularnewline
68 & 2788128 & 0.499999999999936 \tabularnewline
69 & 1391596 & 0.499999999999742 \tabularnewline
70 & 1366378 & 0.499999999999732 \tabularnewline
71 & 946295 & 0.499999999999442 \tabularnewline
72 & 859626 & 0.499999999999323 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=262792&T=2

[TABLE]
[ROW][C]Obs.[/C][C]Original[/C][C]Transformed[/C][/ROW]
[ROW][C]1[/C][C]655362[/C][C]0.499999999998836[/C][/ROW]
[ROW][C]2[/C][C]873127[/C][C]0.499999999999344[/C][/ROW]
[ROW][C]3[/C][C]1107897[/C][C]0.499999999999593[/C][/ROW]
[ROW][C]4[/C][C]1555964[/C][C]0.499999999999793[/C][/ROW]
[ROW][C]5[/C][C]1671159[/C][C]0.499999999999821[/C][/ROW]
[ROW][C]6[/C][C]1493308[/C][C]0.499999999999776[/C][/ROW]
[ROW][C]7[/C][C]2957796[/C][C]0.499999999999943[/C][/ROW]
[ROW][C]8[/C][C]2638691[/C][C]0.499999999999928[/C][/ROW]
[ROW][C]9[/C][C]1305669[/C][C]0.499999999999707[/C][/ROW]
[ROW][C]10[/C][C]1280496[/C][C]0.499999999999695[/C][/ROW]
[ROW][C]11[/C][C]921900[/C][C]0.499999999999412[/C][/ROW]
[ROW][C]12[/C][C]867888[/C][C]0.499999999999336[/C][/ROW]
[ROW][C]13[/C][C]652586[/C][C]0.499999999998826[/C][/ROW]
[ROW][C]14[/C][C]913831[/C][C]0.499999999999401[/C][/ROW]
[ROW][C]15[/C][C]1108544[/C][C]0.499999999999593[/C][/ROW]
[ROW][C]16[/C][C]1555827[/C][C]0.499999999999793[/C][/ROW]
[ROW][C]17[/C][C]1699283[/C][C]0.499999999999827[/C][/ROW]
[ROW][C]18[/C][C]1509458[/C][C]0.499999999999781[/C][/ROW]
[ROW][C]19[/C][C]3268975[/C][C]0.499999999999953[/C][/ROW]
[ROW][C]20[/C][C]2425016[/C][C]0.499999999999915[/C][/ROW]
[ROW][C]21[/C][C]1312703[/C][C]0.49999999999971[/C][/ROW]
[ROW][C]22[/C][C]1365498[/C][C]0.499999999999732[/C][/ROW]
[ROW][C]23[/C][C]934453[/C][C]0.499999999999427[/C][/ROW]
[ROW][C]24[/C][C]775019[/C][C]0.499999999999168[/C][/ROW]
[ROW][C]25[/C][C]651142[/C][C]0.499999999998821[/C][/ROW]
[ROW][C]26[/C][C]843192[/C][C]0.499999999999297[/C][/ROW]
[ROW][C]27[/C][C]1146766[/C][C]0.49999999999962[/C][/ROW]
[ROW][C]28[/C][C]1652601[/C][C]0.499999999999817[/C][/ROW]
[ROW][C]29[/C][C]1465906[/C][C]0.499999999999767[/C][/ROW]
[ROW][C]30[/C][C]1652734[/C][C]0.499999999999817[/C][/ROW]
[ROW][C]31[/C][C]2922334[/C][C]0.499999999999941[/C][/ROW]
[ROW][C]32[/C][C]2702805[/C][C]0.499999999999932[/C][/ROW]
[ROW][C]33[/C][C]1458956[/C][C]0.499999999999765[/C][/ROW]
[ROW][C]34[/C][C]1410363[/C][C]0.499999999999749[/C][/ROW]
[ROW][C]35[/C][C]1019279[/C][C]0.499999999999519[/C][/ROW]
[ROW][C]36[/C][C]936574[/C][C]0.49999999999943[/C][/ROW]
[ROW][C]37[/C][C]708917[/C][C]0.499999999999005[/C][/ROW]
[ROW][C]38[/C][C]885295[/C][C]0.499999999999362[/C][/ROW]
[ROW][C]39[/C][C]1099663[/C][C]0.499999999999586[/C][/ROW]
[ROW][C]40[/C][C]1576220[/C][C]0.499999999999799[/C][/ROW]
[ROW][C]41[/C][C]1487870[/C][C]0.499999999999774[/C][/ROW]
[ROW][C]42[/C][C]1488635[/C][C]0.499999999999774[/C][/ROW]
[ROW][C]43[/C][C]2882530[/C][C]0.49999999999994[/C][/ROW]
[ROW][C]44[/C][C]2677026[/C][C]0.49999999999993[/C][/ROW]
[ROW][C]45[/C][C]1404398[/C][C]0.499999999999746[/C][/ROW]
[ROW][C]46[/C][C]1344370[/C][C]0.499999999999723[/C][/ROW]
[ROW][C]47[/C][C]936865[/C][C]0.49999999999943[/C][/ROW]
[ROW][C]48[/C][C]872705[/C][C]0.499999999999344[/C][/ROW]
[ROW][C]49[/C][C]628151[/C][C]0.499999999998733[/C][/ROW]
[ROW][C]50[/C][C]953712[/C][C]0.49999999999945[/C][/ROW]
[ROW][C]51[/C][C]1160384[/C][C]0.499999999999629[/C][/ROW]
[ROW][C]52[/C][C]1400618[/C][C]0.499999999999745[/C][/ROW]
[ROW][C]53[/C][C]1661511[/C][C]0.499999999999819[/C][/ROW]
[ROW][C]54[/C][C]1495347[/C][C]0.499999999999776[/C][/ROW]
[ROW][C]55[/C][C]2918786[/C][C]0.499999999999941[/C][/ROW]
[ROW][C]56[/C][C]2775677[/C][C]0.499999999999935[/C][/ROW]
[ROW][C]57[/C][C]1407026[/C][C]0.499999999999747[/C][/ROW]
[ROW][C]58[/C][C]1370199[/C][C]0.499999999999734[/C][/ROW]
[ROW][C]59[/C][C]964526[/C][C]0.499999999999463[/C][/ROW]
[ROW][C]60[/C][C]850851[/C][C]0.499999999999309[/C][/ROW]
[ROW][C]61[/C][C]683118[/C][C]0.499999999998929[/C][/ROW]
[ROW][C]62[/C][C]847224[/C][C]0.499999999999303[/C][/ROW]
[ROW][C]63[/C][C]1073256[/C][C]0.499999999999566[/C][/ROW]
[ROW][C]64[/C][C]1514326[/C][C]0.499999999999782[/C][/ROW]
[ROW][C]65[/C][C]1503734[/C][C]0.499999999999779[/C][/ROW]
[ROW][C]66[/C][C]1507712[/C][C]0.49999999999978[/C][/ROW]
[ROW][C]67[/C][C]2865698[/C][C]0.499999999999939[/C][/ROW]
[ROW][C]68[/C][C]2788128[/C][C]0.499999999999936[/C][/ROW]
[ROW][C]69[/C][C]1391596[/C][C]0.499999999999742[/C][/ROW]
[ROW][C]70[/C][C]1366378[/C][C]0.499999999999732[/C][/ROW]
[ROW][C]71[/C][C]946295[/C][C]0.499999999999442[/C][/ROW]
[ROW][C]72[/C][C]859626[/C][C]0.499999999999323[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=262792&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=262792&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
16553620.499999999998836
28731270.499999999999344
311078970.499999999999593
415559640.499999999999793
516711590.499999999999821
614933080.499999999999776
729577960.499999999999943
826386910.499999999999928
913056690.499999999999707
1012804960.499999999999695
119219000.499999999999412
128678880.499999999999336
136525860.499999999998826
149138310.499999999999401
1511085440.499999999999593
1615558270.499999999999793
1716992830.499999999999827
1815094580.499999999999781
1932689750.499999999999953
2024250160.499999999999915
2113127030.49999999999971
2213654980.499999999999732
239344530.499999999999427
247750190.499999999999168
256511420.499999999998821
268431920.499999999999297
2711467660.49999999999962
2816526010.499999999999817
2914659060.499999999999767
3016527340.499999999999817
3129223340.499999999999941
3227028050.499999999999932
3314589560.499999999999765
3414103630.499999999999749
3510192790.499999999999519
369365740.49999999999943
377089170.499999999999005
388852950.499999999999362
3910996630.499999999999586
4015762200.499999999999799
4114878700.499999999999774
4214886350.499999999999774
4328825300.49999999999994
4426770260.49999999999993
4514043980.499999999999746
4613443700.499999999999723
479368650.49999999999943
488727050.499999999999344
496281510.499999999998733
509537120.49999999999945
5111603840.499999999999629
5214006180.499999999999745
5316615110.499999999999819
5414953470.499999999999776
5529187860.499999999999941
5627756770.499999999999935
5714070260.499999999999747
5813701990.499999999999734
599645260.499999999999463
608508510.499999999999309
616831180.499999999998929
628472240.499999999999303
6310732560.499999999999566
6415143260.499999999999782
6515037340.499999999999779
6615077120.49999999999978
6728656980.499999999999939
6827881280.499999999999936
6913915960.499999999999742
7013663780.499999999999732
719462950.499999999999442
728596260.499999999999323



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')
}