Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_boxcoxlin.wasp
Title produced by softwareBox-Cox Linearity Plot
Date of computationWed, 23 Dec 2009 14:53:36 -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/2009/Dec/23/t1261605250gu17r1m3nv3jw0t.htm/, Retrieved Mon, 29 Apr 2024 11:58:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70589, Retrieved Mon, 29 Apr 2024 11:58:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact95
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Linearity Plot] [Box cox linearity...] [2009-12-23 21:53:36] [b02b8a83db8a631da1ab9c106b4cdcf2] [Current]
Feedback Forum

Post a new message
Dataseries X:
517.009
509.933
509.127
500.857
506.971
569.323
579.714
577.992
565.464
547.344
554.788
562.325
560.854
555.332
543.599
536.662
542.722
593.530
610.763
612.613
611.324
594.167
595.454
590.865
589.379
584.428
573.100
567.456
569.028
620.735
628.884
628.232
612.117
595.404
597.141
593.408
590.072
579.799
574.205
572.775
572.942
619.567
625.809
619.916
587.625
565.742
557.274
560.576
548.854
531.673
525.919
511.038
498.662
555.362
564.591
541.657
527.070
509.846
514.258
516.922
507.561
492.622
490.243
469.357
477.580
528.379
533.590
517.945
506.174
501.866
516.141
528.222
532.638
536.322
536.535
523.597
536.214
586.570
596.594
Dataseries Y:
27071
29462
26105
22397
23843
21705
18089
20764
25316
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698
31956
29506
34506
27165
26736
23691
18157
17328
18205
20995
17382
9367
31124
26551
30651
25859
25100
25778
20418
18688
20424
24776
19814
12738
31566
30111
30019
31934
25826
26835
20205
17789
20520
22518
15572
11509
25447
24090
27786
26195
20516
22759
19028
16971




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

\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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70589&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70589&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70589&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'Gwilym Jenkins' @ 72.249.127.135







Box-Cox Linearity Plot
# observations x79
maximum correlation0.278263427444157
optimal lambda(x)2
Residual SD (orginial)5479.1949713671
Residual SD (transformed)5472.41427207423

\begin{tabular}{lllllllll}
\hline
Box-Cox Linearity Plot \tabularnewline
# observations x & 79 \tabularnewline
maximum correlation & 0.278263427444157 \tabularnewline
optimal lambda(x) & 2 \tabularnewline
Residual SD (orginial) & 5479.1949713671 \tabularnewline
Residual SD (transformed) & 5472.41427207423 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70589&T=1

[TABLE]
[ROW][C]Box-Cox Linearity Plot[/C][/ROW]
[ROW][C]# observations x[/C][C]79[/C][/ROW]
[ROW][C]maximum correlation[/C][C]0.278263427444157[/C][/ROW]
[ROW][C]optimal lambda(x)[/C][C]2[/C][/ROW]
[ROW][C]Residual SD (orginial)[/C][C]5479.1949713671[/C][/ROW]
[ROW][C]Residual SD (transformed)[/C][C]5472.41427207423[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70589&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70589&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 x79
maximum correlation0.278263427444157
optimal lambda(x)2
Residual SD (orginial)5479.1949713671
Residual SD (transformed)5472.41427207423



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