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, 07 Nov 2008 04:06:19 -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/07/t1226056076oe90aj3atszz7bl.htm/, Retrieved Sun, 19 May 2024 06:43:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=22470, Retrieved Sun, 19 May 2024 06:43:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact252
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Bivariate Kernel Density Estimation] [Various EDA topic...] [2008-11-07 10:38:01] [e5d91604aae608e98a8ea24759233f66]
F RMPD  [Trivariate Scatterplots] [Various EDA topic...] [2008-11-07 10:42:57] [e5d91604aae608e98a8ea24759233f66]
F RMPD      [Box-Cox Linearity Plot] [Various EDA topic...] [2008-11-07 11:06:19] [55ca0ca4a201c9689dcf5fae352c92eb] [Current]
F RM D        [Box-Cox Normality Plot] [Various EDA topic...] [2008-11-10 11:55:49] [e5d91604aae608e98a8ea24759233f66]
F RMPD          [Maximum-likelihood Fitting - Normal Distribution] [Various EDA topic...] [2008-11-10 12:02:10] [e5d91604aae608e98a8ea24759233f66]
- RMPD          [Testing Variance - Critical Value (Region)] [Various types of ...] [2008-11-10 12:36:06] [e5d91604aae608e98a8ea24759233f66]
-   P             [Testing Variance - Critical Value (Region)] [Various types of ...] [2008-11-10 12:44:47] [e5d91604aae608e98a8ea24759233f66]
- RMPD            [Notched Boxplots] [Various types of ...] [2008-11-10 13:05:18] [e5d91604aae608e98a8ea24759233f66]
- RMPD          [Testing Variance - p-value (probability)] [Various types of ...] [2008-11-10 12:39:28] [e5d91604aae608e98a8ea24759233f66]
Feedback Forum
2008-11-17 18:48:48 [8e2cc0b2ef568da46d009b2f601285b2] [reply
De Box-Cox linearity plot is een reek transformatie. Het is de bedoeling een niet lineair verband recht te trekken om de vermoedens te bevestigen.

Je kan op de grafiek het optimum lambda aflezen, bij 2 zie je de grafiek al namelijk afzwakken. (optimal lambda(x) 1.83) Deze lambda waarde moet je gebruiken in de lambda hervorming. Indien je met deze techniek een 'rechte' lijn bekomt kunnen geen conclusies getrokken worden.
2008-11-22 18:28:07 [Kenny Simons] [reply
Een Box-Cox linearity plot is een manier om een tijdreeks te transformeren, zodat je een verband lineair kan maken. Om nu een verband lineair te maken, moet je gaan zoeken of er een lambda parameter bestaat, zodat je de tijdreeks op een juiste manier kan transformeren.

Grafisch moet je de lambdawaarde kiezen met de maximumwaarde, als je geen maximum kan aflezen, dan kan je uiteraard ook geen conclusies trekken.

Hier zien we grafisch zo goed als geen verschil op de 2 grafieken. Er is met andere woorden zo goed als geen transformatie gebeurd.
2008-11-23 14:25:57 [Chi-Kwong Man] [reply
Box-Cox transformatie: Met een bepaald formule kan men heel gemakkelijk een probleem oplossen. De computer berekend alle lambda waardes tussen -2 en +2, diegene met de hoogste correlatie wordt toegepast, maar als je maximum niet kan zien kan je geen besluit vormen.

Post a new message
Dataseries X:
99,29
98,69
107,92
101,03
97,55
103,02
94,08
94,12
115,08
116,48
103,42
112,51
95,55
97,53
119,26
100,94
97,73
115,25
92,8
99,2
118,69
110,12
110,26
112,9
102,17
99,38
116,1
103,77
101,81
113,74
89,67
99,5
122,89
108,61
114,37
110,5
104,08
103,64
121,61
101,14
115,97
120,12
95,97
105,01
124,68
123,89
123,61
114,76
108,75
106,09
123,17
106,16
115,18
120,6
109,48
114,44
121,44
129,48
124,32
112,59
Dataseries Y:
1946,81
1765,9
1635,25
1833,42
1910,43
1959,67
1969,6
2061,41
2093,48
2120,88
2174,56
2196,72
2350,44
2440,25
2408,64
2472,81
2407,6
2454,62
2448,05
2497,84
2645,64
2756,76
2849,27
2921,44
3080,58
3106,22
3119,31
3061,26
3097,31
3161,69
3257,16
3277,01
3295,32
3363,99
3494,17
3667,03
3813,06
3917,96
3895,51
3733,22
3801,06
3570,12
3701,61
3862,27
3970,1
4138,52
4199,75
4290,89
4443,91
4502,64
4356,98
4591,27
4696,96
4621,4
4562,84
4202,52
4296,49
4435,23
4105,18
4116,68




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 11 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=22470&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]11 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=22470&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=22470&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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132







Box-Cox Linearity Plot
# observations x60
maximum correlation0.49822459475267
optimal lambda(x)1.83
Residual SD (orginial)788.153478330177
Residual SD (transformed)788.00144679732

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=22470&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.49822459475267
optimal lambda(x)1.83
Residual SD (orginial)788.153478330177
Residual SD (transformed)788.00144679732



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