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 computationWed, 04 Oct 2023 16:07:16 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2023/Oct/04/t1696428766s0ayawltw24tkzx.htm/, Retrieved Mon, 21 Sep 2026 12:47:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=319955, Retrieved Mon, 21 Sep 2026 12:47:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact361
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Normality Plot] [] [2023-10-04 14:07:16] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.46502351319261
2.34106119080844
3.21319668342651
2.05055875093434
1.4641412314356
1.56780330338684
0.267435160857527
0.648449893229704
0.167929942178207
0.136378771626288
na
0.502729332026689
0.179701226695336
1.12118202629448
1.66813661857449
0.25425058953095
9.39756577694445
16.7891620106847
10.7752011729172
23.9931126439466
15.1311667472332
24.0270897595
18.393690119413
30.4621205021441
1.40504011235605
0.362004309083964
2.86267638250919
7.49659514391115
5.01089316881477
3.22885057957819
3.04728167208412
5.84457351044323
6.63430493746435
2.34684371545294
4.14709261240416
47.3918211368469
65.5178122330057
20.754686581809
71.533128885032
32.1935532609917
35.137572105255
0.106055245149591
25.3698205080026
0.2711405824833
4.13117009475203
81.3397131731656
99.6945844246499
69.0496984562305
68.0590521959199
43.6707421294631
83.5640598898798
54.6944335677313
47.2611393153268
NA
91.9202552055475
23.8462225423571
41.932992675477
45.8283042558088
18.1605270894452
52.1311964350748
20.1111302911999
25.7886859720846
29.4701681507788
14.961977167431
23.9398696582381
0.495345179012578
0.411642997018149
0.302834942983496
0.422543541284354
0.304487207049136
0.408664293795714
0.942357793404666
0.356953799923854
1.05573515620343
0.577753006938685
48.4614197672795
0.0652065101203592
9.10343135811174
47.9751157580292
20.4402544115315
53.0451115208272
13.5123448317848
63.4086703531309
49.8370245613882
50.9268083552802
27.1799211982538
50.5101427067785
74.7902332654531
30.426034422775
93.6071805965438
0.143540930097526
63.1435316308522
67.9546596891784
54.7029169194444
28.4434276169925
45.5351211869818
32.0237722770858
na
42.5106227485386
52.9484257626717
30.0746555775323
40.4909307597802
44.988584085935
45.507140726456
NA
NA
9.59861446881911
NA
2.07133404022613
9.32954323970171
3.79143449566074
5.21596653126721
1.19596321009985
4.76196213838348
41.973502009694
37.4116127290205
39.8566017823181
30.5343020305019
70.8226947813835
45.6625092872873
38.0001143865247
36.8623267259453
37.267741311928
43.1898985210362
24.8482256396727
NA
68.3475960529766
20.0757212224455
19.8545626581144
15.1803788010395
NA
na
32.9963416291122
22.7017541648605
2.04952453913587
2.06352877139037
1.25116898639656
1.67690203714678
2.00134376492032
1.98163376037319
1.36652569560786
0.613985786510168
1.06616716074756
NA
0.0358417776640602
0.0229260724300188
0.0161807430950274
0.0399193602091082
0.0448012218896982
0.0614766117135684
0.0056692666645853
0.0477768372827104
NA
0.281274799396332
0.752147323081958
2.44209137717648
1.65687733337903
1.50925044612999
1.28305368509554
2.8741190092921
1.9426021633704
0.492794842653027
1.87010980077843
1.45221581153358
1.22536023598143
3.63543780480706
3.0040751930471
2.04003317553418
9.04429532138328
3.19283842788769
3.74773416195165
2.34880451287208
1.40186283576647
2.2685731031712




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=319955&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=319955&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319955&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R ServerBig Analytics Cloud Computing Center



Parameters (Session):
par1 = Simple Box-Cox transform ; par2 = -8 ; par3 = 2 ; par4 = 0 ; par5 = Yes ;
Parameters (R input):
par1 = Simple Box-Cox transform ; par2 = -8 ; par3 = 2 ; par4 = 0 ; par5 = Yes ;
R code (references can be found in the software module):
par5 <- 'Yes'
par4 <- '0'
par3 <- '2'
par2 <- '-8'
par1 <- 'Simple Box-Cox transform'
library(car)
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),sort(x1))
if (mx < c[i])
{
mx <- c[i]
mxli <- l[i]
x1.best <- x1
}
}
print(c)
print(mx)
print(mxli)
print(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)
}
mypT <- powerTransform(x)
summary(mypT)
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')
qqPlot(x)
grid()
mtext('Original Data')
dev.off()
bitmap(file='test5.png')
qqPlot(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)
a<-table.row.start(a)
a<-table.element(a,'transformation formula',header=TRUE)
if (par1 == 'Full Box-Cox transform') {
a<-table.element(a,'for all lambda <> 0 : T(Y) = (Y^lambda - 1) / lambda')
} else {
a<-table.element(a,'for all lambda <> 0 : T(Y) = Y^lambda')
}
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')
}
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Maximum Likelihood Estimation of Lambda',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,paste('<pre>',RC.texteval('summary(mypT)'),'</pre>',sep=''))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')