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 computationMon, 10 Nov 2008 07:27:51 -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/2008/Nov/10/t12263273185gz1btiexnp50m1.htm/, Retrieved Sun, 19 May 2024 09:38:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=23085, Retrieved Sun, 19 May 2024 09:38:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact137
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Bivariate Kernel Density Estimation] [Bivariate Kernel ...] [2008-11-10 12:17:20] [5161246d1ccc1b670cc664d03050f084]
F RMPD    [Box-Cox Linearity Plot] [Q3 Various EDA] [2008-11-10 14:27:51] [e515c0250d6233b5d2604259ab52cebe] [Current]
Feedback Forum
2008-11-23 16:36:44 [Davy De Nef] [reply
De student gebruikt de box-cox linearity plot. Hier gaat het om scatterplots waarvan we een niet lineair verband vermoeden. Dit lineair verband wordt onderzocht via transformatie. Via deze software worden alle mogelijke transformaties met de een bepaalde stepsize weergegeven. Je kijkt waar deze grafiek een maximum bereikt en leest bijgevolg de lambda waarde af op de horizontale as. In dit geval is dat lambda 1,25.

Post a new message
Dataseries X:
136,5
146,4
157,7
148,7
154,6
152,1
144,8
142,1
157
159,1
164
151,5
135,9
138,5
161
151,7
142,9
157,4
138,9
141
150,9
149,9
153
144,3
128,1
123,3
155,9
144,1
134,1
153,1
131
129,8
139,9
135,6
126,8
134,4
113,5
107,5
133,8
119
125,9
130,1
114,2
111,6
131,2
124,1
127,1
123,4
100,7
100,3
121,6
110,5
110,3
122,7
102,6
101,8
113,6
107,2
116,8
112,5
Dataseries Y:
147,5
164,7
176,2
161,8
171,7
169
161,4
157,2
166,2
162,1
169,1
158,4
139,7
145,2
165,3
154,4
147,4
165,3
145,7
147,2
156,1
152,9
153,8
151,7
131,8
131
155,8
143,8
139,8
160,1
136,5
131
153,7
141,3
138,9
141,2
120,3
118,9
141,7
126,2
130,6
139,8
119,5
115,8
142,6
127,7
131,8
129,5
111,1
112,6
130,8
115,4
120,5
131,9
111,2
108,9
128,1
110,7
124,1
121,5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=23085&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]3 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=23085&T=0

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







Box-Cox Linearity Plot
# observations x60
maximum correlation0.96861835513416
optimal lambda(x)1.25
Residual SD (orginial)4.51867589506499
Residual SD (transformed)4.50907866612922

\begin{tabular}{lllllllll}
\hline
Box-Cox Linearity Plot \tabularnewline
# observations x & 60 \tabularnewline
maximum correlation & 0.96861835513416 \tabularnewline
optimal lambda(x) & 1.25 \tabularnewline
Residual SD (orginial) & 4.51867589506499 \tabularnewline
Residual SD (transformed) & 4.50907866612922 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=23085&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.96861835513416[/C][/ROW]
[ROW][C]optimal lambda(x)[/C][C]1.25[/C][/ROW]
[ROW][C]Residual SD (orginial)[/C][C]4.51867589506499[/C][/ROW]
[ROW][C]Residual SD (transformed)[/C][C]4.50907866612922[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=23085&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=23085&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.96861835513416
optimal lambda(x)1.25
Residual SD (orginial)4.51867589506499
Residual SD (transformed)4.50907866612922



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