Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_boxcoxlin.wasp
Title produced by softwareBox-Cox Linearity Plot
Date of computationMon, 03 Dec 2007 03:04:52 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/03/t119667560891wjecw8iqxylaq.htm/, Retrieved Sat, 04 May 2024 02:31:32 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2299, Retrieved Sat, 04 May 2024 02:31:32 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsex012008
Estimated Impact360
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Linearity Plot] [omzet vs aantal] [2007-12-03 10:04:52] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
589
606
566
487
442
463
547
432
513
602
637
913
576
634
563
513
483
477
524
470
427
537
662
1079
816
705
653
584
508
446
604
446
512
533
791
1206
783
567
473
412
314
323
438
429
468
518
555
816
673
593
569
505
447
433
549
553
505
601
706
852
643
448
551
476
416
331
435
395
405
619
596
889
668
555
620
472
460
417
582
525
507
750
899
1075
993
777
675
655
535
491
686
637
652
794
859
1049
1022
762
762
563
573
473
527
710
630
706
870
1069
1021
799
694
521
622
614
661
630
Dataseries Y:
122302.01
109264.65
103674.75
103890.3
75512.66
83121.3
125096.81
74206.73
88481.63
111598.17
146919.48
150790.85
113780.5
110870.76
118785.32
112820.5
102188.92
97092.73
114067.82
89690.15
89267.9
96198.64
129599.75
169424.7
152510.91
121850.2
144737.64
121381.88
106894.86
94305.06
116800.42
77584.28
100680.88
106634.05
168390.77
211971.89
136163.28
168950.25
89816.88
85406.93
66055.52
73311.68
85674.51
82822.59
94277.63
100991.65
149245.88
208517.17
40733.51
121352.23
104020.11
99566.82
101352.17
106628.41
109696.95
248696.37
105628.33
120449.17
136547.7
140896.42
131509.91
95450.31
133592.64
110332.9
88110.54
64931.25
98446.22
84212.38
77519.55
124806.02
102185.94
151348.79
124378.28
101433.13
126724.22
87461.88
95288.27
129055.33
107753.06
96364.03
71662.75
125666.24
456841.51
167642.32
167154.73
139685.18
119275.2
122746.05
107337.43
112584.89
133183.08
121152.57
119815.6
122858.44
152077.17
157221.96
140435.08
101455.09
104791.29
77226.59
84477.43
66227.74
89076.23
108924.43
83926.11
91764.8
120892.76
129952.42
135865.14
105512.77
96486.62
78064.88
92370.22
98454.46
96703.93
83170.95




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

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

[TABLE]
[ROW][C]Summary of compuational 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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2299&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2299&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Box-Cox Linearity Plot
# observations x116
maximum correlation0.55653220343351
optimal lambda(x)0.73
Residual SD (orginial)37040.3410741622
Residual SD (transformed)37021.2202070004

\begin{tabular}{lllllllll}
\hline
Box-Cox Linearity Plot \tabularnewline
# observations x & 116 \tabularnewline
maximum correlation & 0.55653220343351 \tabularnewline
optimal lambda(x) & 0.73 \tabularnewline
Residual SD (orginial) & 37040.3410741622 \tabularnewline
Residual SD (transformed) & 37021.2202070004 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2299&T=1

[TABLE]
[ROW][C]Box-Cox Linearity Plot[/C][/ROW]
[ROW][C]# observations x[/C][C]116[/C][/ROW]
[ROW][C]maximum correlation[/C][C]0.55653220343351[/C][/ROW]
[ROW][C]optimal lambda(x)[/C][C]0.73[/C][/ROW]
[ROW][C]Residual SD (orginial)[/C][C]37040.3410741622[/C][/ROW]
[ROW][C]Residual SD (transformed)[/C][C]37021.2202070004[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2299&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2299&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 Linearity Plot
# observations x116
maximum correlation0.55653220343351
optimal lambda(x)0.73
Residual SD (orginial)37040.3410741622
Residual SD (transformed)37021.2202070004



Parameters (Session):
Parameters (R input):
R code (references can be found in the software module):
n <- length(x)
c <- array(NA,dim=c(401))
l <- array(NA,dim=c(401))
mx <- 0
mxli <- -999
for (i in 1:401)
{
l[i] <- (i-201)/100
if (l[i] != 0)
{
x1 <- (x^l[i] - 1) / l[i]
} else {
x1 <- log(x)
}
c[i] <- cor(x1,y)
if (mx < abs(c[i]))
{
mx <- abs(c[i])
mxli <- l[i]
}
}
c
mx
mxli
if (mxli != 0)
{
x1 <- (x^mxli - 1) / mxli
} else {
x1 <- log(x)
}
r<-lm(y~x)
se <- sqrt(var(r$residuals))
r1 <- lm(y~x1)
se1 <- sqrt(var(r1$residuals))
bitmap(file='test1.png')
plot(l,c,main='Box-Cox Linearity Plot',xlab='Lambda',ylab='correlation')
grid()
dev.off()
bitmap(file='test2.png')
plot(x,y,main='Linear Fit of Original Data',xlab='x',ylab='y')
abline(r)
grid()
mtext(paste('Residual Standard Deviation = ',se))
dev.off()
bitmap(file='test3.png')
plot(x1,y,main='Linear Fit of Transformed Data',xlab='x',ylab='y')
abline(r1)
grid()
mtext(paste('Residual Standard Deviation = ',se1))
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Box-Cox Linearity 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(x)',header=TRUE)
a<-table.element(a,mxli)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Residual SD (orginial)',header=TRUE)
a<-table.element(a,se)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Residual SD (transformed)',header=TRUE)
a<-table.element(a,se1)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')