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 computationFri, 20 Nov 2009 07:18:23 -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/Nov/20/t1258726784w63jcl9r3qwqseg.htm/, Retrieved Sat, 20 Apr 2024 10:22:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=58195, Retrieved Sat, 20 Apr 2024 10:22:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact117
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Back to Back Histogram] [Back2Back] [2009-11-08 13:48:34] [f15cf5036ae52d4243ad71d4fb151dbe]
- RMPD    [Box-Cox Linearity Plot] [Workshop6/Box cox] [2009-11-20 14:18:23] [f94f05f163a3ee3ab544c4fef41db0eb] [Current]
Feedback Forum

Post a new message
Dataseries X:
114,08
112,95
135,31
134,31
133,03
140,11
124,69
131,68
150,95
137,26
130,51
143,15
118,01
122,56
147,97
135,74
151,62
154,82
145,59
147,12
175,86
140,66
152,69
154,38
132,45
136,44
153,24
154,11
155,93
142,53
148,73
147,73
166,79
144,30
156,07
161,70
152,10
140,45
155,56
174,53
167,16
159,48
173,22
176,13
180,31
185,84
169,43
195,25
174,99
156,42
182,08
182,00
153,28
136,72
130,19
132,04
143,89
133,38
127,98
150,45
133,55
Dataseries Y:
136,49
142,62
141,71
149,51
147,39
131,96
136,38
127,34
133,85
125,14
141,25
149,32
120,92
134,85
131,93
134,22
143,07
145,37
134,32
126,31
162,21
124,09
153,91
154,34
138,70
150,98
146,39
178,30
168,23
162,52
158,86
152,17
171,01
171,49
189,62
177,46
179,98
156,96
167,89
194,78
192,78
165,06
196,60
151,64
187,02
210,99
219,08
235,68
241,44
187,46
229,57
208,44
215,09
217,00
171,08
178,41
196,34
172,11
154,93
182,26
181,74




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=58195&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=58195&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=58195&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 x61
maximum correlation0.671847652223145
optimal lambda(x)2
Residual SD (orginial)22.6629875376643
Residual SD (transformed)22.4009976606917

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=58195&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 x61
maximum correlation0.671847652223145
optimal lambda(x)2
Residual SD (orginial)22.6629875376643
Residual SD (transformed)22.4009976606917



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