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 03:12:35 -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/t122631199047ct35t9xd03qs9.htm/, Retrieved Sun, 19 May 2024 08:51:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=22904, Retrieved Sun, 19 May 2024 08:51:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact208
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [VMAW] [2008-10-13 16:54:40] [cbd3d88cd5aad6543e769146e7e26b0c]
F RMPD    [Box-Cox Linearity Plot] [Opdracht 4 Q3] [2008-11-10 10:12:35] [2ae704d6b0222e84f58032588d68322b] [Current]
Feedback Forum
2008-11-19 15:32:36 [Mehmet Yilmaz] [reply
Juiste berekening zonder enige uitleg.

Met de Box-Cox Linearity Plot kunnen we een tijdreeks transformeren en op die manier interpretatie fouten voorkomen. vb. De scatterplot doet denken dat er een lineair verband bestaat, maar eigenlijk is er geen verband.
Hier worden de correlaties berekend tussen de verschillende waarden en de hoogste hiervan wordt genomen.

Als resultaat bekomen we een maximum correlatie van 0.946555596558827 bij een optimale lambda van -0.09.

De andere 2 grafieken geven eveneens de correlatie weer. Dankzij de afstand van de puntjes kunnen we de waarde van de correlatie zien. Hoe dichter bij de lijn hoe hoger de correlatie.
2008-11-24 17:34:03 [Jan Cavents] [reply
geen uitleg in het document. met de box-cox linearity plot wordt de tijdsreeks getransformeerd en zo kunnen we een foute interpretatie maken. zo zou de scatterplot een lineair verband geven terwijl er geen sprake is.

zoals Mehmet Yilmaz ook zei, worden hier de correlaties berekend tussen de verschillende waarden en de hoogste hiervan worden genomen.
2008-11-24 19:03:32 [Steven Hulsmans] [reply
Door de transformatie van de tijdreeks kunnen er verkeerde conclusies getrokken worden.

Post a new message
Dataseries X:
97.3
101
113.2
101
105.7
113.9
86.4
96.5
103.3
114.9
105.8
94.2
98.4
99.4
108.8
112.6
104.4
112.2
81.1
97.1
112.6
113.8
107.8
103.2
103.3
101.2
107.7
110.4
101.9
115.9
89.9
88.6
117.2
123.9
100
103.6
94.1
98.7
119.5
112.7
104.4
124.7
89.1
97
121.6
118.8
114
111.5
97.2
102.5
113.4
109.8
104.9
126.1
80
96.8
117.2
112.3
117.3
111.1
102.2
104.3
122.9
107.6
121.3
131.5
89
104.4
128.9
135.9
133.3
121.3
Dataseries Y:
104.8
105.6
118.3
89.9
90.2
107
64.5
92.6
95.8
94.3
91.2
86.3
77.6
82.5
97.7
83.3
84.2
92.8
77.4
72.5
88.8
93.4
92.6
90.7
81.6
84.1
88.1
85.3
82.9
84.8
71.2
68.9
94.3
97.6
85.6
91.9
75.8
79.8
99
88.5
86.7
97.9
94.3
72.9
91.8
93.2
86.5
98.9
77.2
79.4
90.4
81.4
85.8
103.6
73.6
75.7
99.2
88.7
94.6
98.7
84.2
87.7
103.3
88.2
93.4
106.3
73.1
78.6
101.6
101.4
98.5
99




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=22904&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=22904&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=22904&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







Box-Cox Linearity Plot
# observations x72
maximum correlation0.698955851936071
optimal lambda(x)-0.09
Residual SD (orginial)7.42169504921543
Residual SD (transformed)7.39424414642866

\begin{tabular}{lllllllll}
\hline
Box-Cox Linearity Plot \tabularnewline
# observations x & 72 \tabularnewline
maximum correlation & 0.698955851936071 \tabularnewline
optimal lambda(x) & -0.09 \tabularnewline
Residual SD (orginial) & 7.42169504921543 \tabularnewline
Residual SD (transformed) & 7.39424414642866 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=22904&T=1

[TABLE]
[ROW][C]Box-Cox Linearity Plot[/C][/ROW]
[ROW][C]# observations x[/C][C]72[/C][/ROW]
[ROW][C]maximum correlation[/C][C]0.698955851936071[/C][/ROW]
[ROW][C]optimal lambda(x)[/C][C]-0.09[/C][/ROW]
[ROW][C]Residual SD (orginial)[/C][C]7.42169504921543[/C][/ROW]
[ROW][C]Residual SD (transformed)[/C][C]7.39424414642866[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=22904&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=22904&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 x72
maximum correlation0.698955851936071
optimal lambda(x)-0.09
Residual SD (orginial)7.42169504921543
Residual SD (transformed)7.39424414642866



Parameters (Session):
par1 = complete ; par2 = ALL ; par3 = FALSE ; par4 = FALSE ;
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')