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 computationSun, 04 Nov 2007 03:49:24 -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/Nov/04/ojd7304ajds15ah1194173246.htm/, Retrieved Thu, 31 Oct 2024 23:34:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=340, Retrieved Thu, 31 Oct 2024 23:34:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsw4q3
Estimated Impact215
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Linearity Plot] [workshop4.q3] [2007-11-04 10:49:24] [129742d52914620af0bad7eb53591257] [Current]
Feedback Forum

Post a new message
Dataseries X:
99,25
99,36
99,34
99,36
100,85
100,86
100,93
101,25
101,72
101,54
101,35
101,42
101,57
101,76
102,05
102,05
101,89
102,06
102
102,14
102,2
102,3
102,7
102,77
103,1
103,13
103,31
103,52
103,34
103,53
103,8
103,9
103,91
104,21
104,58
104,89
105,15
105,24
105,57
105,62
106,17
106,27
106,41
106,94
107,16
107,32
107,32
107,35
107,55
107,87
108,37
108,38
107,92
108,03
108,14
108,3
108,64
108,66
109,04
109,03
Dataseries Y:
48527,00
44446,00
46380,00
48950,00
38883,00
42928,00
37107,00
30186,00
32602,00
39892,00
32194,00
21629,00
59968,00
45694,00
55756,00
48554,00
41052,00
49822,00
39191,00
31994,00
35735,00
38930,00
33658,00
23849,00
58972,00
59249,00
63955,00
53785,00
52760,00
44795,00
37348,00
32370,00
32717,00
40974,00
33591,00
21124,00
58608,00
46865,00
51378,00
46235,00
47206,00
45382,00
41227,00
33795,00
31295,00
42625,00
33625,00
21538,00
56421,00
53152,00
53536,00
52408,00
41454,00
38271,00
35306,00
26414,00
31917,00
38030,00
27534,00
18387,00




Summary of compuational 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 compuational 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=340&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]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=340&T=0

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







Box-Cox Linearity Plot
# observations x60
maximum correlation0.164091554475179
optimal lambda(x)2
Residual SD (orginial)10713.6118410955
Residual SD (transformed)10711.0976268576

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=340&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 x60
maximum correlation0.164091554475179
optimal lambda(x)2
Residual SD (orginial)10713.6118410955
Residual SD (transformed)10711.0976268576



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