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, 12 Nov 2008 12:11:02 -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/12/t122651740486z138hvzemczch.htm/, Retrieved Sun, 19 May 2024 12:36:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=24398, Retrieved Sun, 19 May 2024 12:36:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsbox-cox
Estimated Impact156
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Box-Cox Linearity Plot] [Box-Cox linearity...] [2008-11-11 11:10:52] [94862dbeb1b738961deecd49975f349b]
F    D    [Box-Cox Linearity Plot] [box-cox linearity...] [2008-11-12 19:11:02] [35c75b0726318bf2908e4a56ed2df1a9] [Current]
Feedback Forum
2008-11-21 22:14:33 [Gilliam Schoorel] [reply
De maximale lambda is hier gelijk aan 2. Door de box-cox wordt de tijdreeks getransformeerd zodat men een betere fit kan bekomen. Dit doet men door lambda toe te voegen. Aan de lijn ziet men opzich al dat het maximum nog niet bereikt is. Op de lineaire fit grafieken kan je duidelijk nogmaals zien dat er geen correlatieverband is. Na de transformatie is de correlatie vooral geconsentreerd rond een bepaald punt. De correlatie is lichtjes verbeterd.
2008-11-24 15:29:56 [Ellen Van den Broeck] [reply
In een box-cox linearityplot worden 2 variabelen in verband gebracht.
De X variabelen worden getransformeerd aan de hand van de Lamba die varieert tussen -2 en 2. Deze transformaties worden uitgevoerd om de scatterplot lineairder te maken. De lijn die je bekomt moet ergens een maximum bekomen. Bij de student is dit niet het geval.

Post a new message
Dataseries X:
62,2
88,5
93,3
89,2
101,3
97
102,2
100,3
78,2
105,9
119,9
108
77
93,1
109,5
100,4
99
113,9
102,1
101,6
84
110,7
111,6
110,7
73,1
87,5
109,6
99,3
92,1
109,3
94,5
91,4
82,9
103,3
96
104,8
65,8
78,7
100,3
85
94,5
97,9
91,9
87,2
84,4
99,2
105,4
110,9
69,8
86,8
106,7
88,8
96,9
108,1
93,7
94,8
79,8
95,6
107,9
104,9
61,9
85,7
92,4
86,4
99,3
95,5
97
102,1
77,8
105,5
113,2
108,8
66,9
89,3
93,6
92
99,5
98,6
94,6
96,7
75,3
102,5
115,1
104,7
71,4
Dataseries Y:
43,5
37,7
36,8
24,4
31,3
43,9
53,6
48,9
30,9
31,8
41,3
43,7
54,1
47,8
36,7
30,8
31,9
61,7
73
64,7
24,2
33,9
32,4
63,2
71,8
60,4
48
44,5
44,9
70,9
72,7
59,5
35,9
40
43,6
57,2
75,8
57,7
47,7
42,3
43
68
70,6
54,2
38,6
40,3
49,2
68,5
75,9
63,2
49,8
37
48,8
74,9
75,3
66,9
44,1
39,8
56,6
77,1
78,5
70,6
54,2
47,2
55,1
74,5
88
80,8
54,4
55,2
73,8
85,3
98,7
86,1
62,5
58,6
67
88,4
96,5
87,1
61,2
62,5
85,2
101,7
113,7




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24398&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 x85
maximum correlation0.149536015258037
optimal lambda(x)-2
Residual SD (orginial)19.2411556718599
Residual SD (transformed)19.1189833918006

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24398&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 x85
maximum correlation0.149536015258037
optimal lambda(x)-2
Residual SD (orginial)19.2411556718599
Residual SD (transformed)19.1189833918006



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