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 09:55:27 -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/t1226508973qxane4bp2ehcjgx.htm/, Retrieved Mon, 20 May 2024 04:12:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=24294, Retrieved Mon, 20 May 2024 04:12:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsBox Cox lineaire plot
Estimated Impact151
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 lineaire ...] [2008-11-12 16:55:27] [962e6c9020896982bc8283b8971710a9] [Current]
Feedback Forum
2008-11-18 08:50:54 [Evelyn Gabriel] [reply
De Box-Cox linearity plot brengt 2 variabelen met elkaar in verband. De transformatie probeert een meer lineair verband weer te geven tussen de variabelen. Hier merken we inderdaad dat de transformatie niet veel invloed heeft gehad.
2008-11-20 12:23:27 [Hannes Van Hoof] [reply
De transformatie heeft inderdaad niet veel nut, aangezien er maar weinig wijziging is tussen de 2 grafieken.
De optimale transformatie is 0.7, aangezien daar de correlatie zijn maximum bereikt.
2008-11-20 15:26:47 [Gert-Jan Geudens] [reply
De transformatie gebeurd via een lambda toe te voegen. De correlatie bereikt een maximum bij een lambda van -0.69. Deze transformatie heeft hier echter weinig zin aangezien de correlatie miniem stijgt van 0.802 naar 0.806. Dit kunnen we ook zien op de scatterplots. De lineaire verdeling is nog amper verbeterd. Dit kan ook iets te maken hebben met het feit dat de oospronkelijke correlatie al zeer hoog was.
2008-11-20 17:41:49 [Marie-Lien Loos] [reply
Het doel van een transformatie is een meer normaal verdeling te bereiken. Hier is er een minimale verbetering.
2008-11-24 11:23:17 [Anouk Greeve] [reply
We gaan hier op zoek naar de beste transformatie van een niet zo lineaire rechte naar een lineaire rechte. De Box-Cox Linearity plot is een plot dat de correlatie tussen Y en de veranderlijke X weergeeft, voor gegeven waarden van de lambda. De waarde die het best beantwoordt aan de maximumcorrelatie (of minimum voor negatieve correlatie) in de plot is de optimale keuze voor de lambda. Hier heeft de transformatie weinig nut omdat er amper een wijziging gebeurt. (kan je zien bij het vergelijken van de 2 grafieken)
2008-11-24 18:32:15 [Birgit Van Dyck] [reply
Een box cox linearity plot transformeert de variabelen, deze transformatie moet nuttig zijn om de scatterplot meer lineair te maken. het is de bedoeling dat de grafiek een maximum vertoont, deze waarde wordt dan gebruikt als lambda. Na de transformatie blijkt er weinig verschil te zijn. De transformatie was onnuttig.

Post a new message
Dataseries X:
274452
267700
257841
255124
247377
247823
276919
294271
281758
270434
258848
256674
258882
255060
247698
244779
240901
239933
270247
283893
282348
273570
254756
254354
255843
254490
251995
246339
244019
245953
279806
283111
281097
275964
270694
271901
274412
272433
268361
268586
264768
269974
304744
309365
308347
298427
289231
291975
294912
293488
290555
284736
281818
287854
316263
325412
326011
328282
317480
317539
313737
312276
309391
302950
300316
304035
333476
337698
335932
323931
313927
314485
313218
309664
302963
298989
298423
301631
329765
335083
327616
309119
295916
291413
291542
284678
276475
272566
264981
263290
296806
303598
286994
276427
266424
267153
268381
262522
255542
253158
243803
250741
280445
285257
Dataseries Y:
116222
110924
103753
99983
93302
91496
119321
139261
133739
123913
113438
109416
109406
105645
101328
97686
93093
91382
122257
139183
139887
131822
116805
113706
113012
110452
107005
102841
98173
98181
137277
147579
146571
138920
130340
128140
127059
122860
117702
113537
108366
111078
150739
159129
157928
147768
137507
136919
136151
133001
125554
119647
114158
116193
152803
161761
160942
149470
139208
134588
130322
126611
122401
117352
112135
112879
148729
157230
157221
146681
136524
132111
125326
122716
116615
113719
110737
112093
143565
149946
149147
134339
122683
115614
116566
111272
104609
101802
94542
93051
124129
130374
123946
114971
105531
104919
104782
101281
94545
93248
84031
87486
115867
120327




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24294&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24294&T=0

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







Box-Cox Linearity Plot
# observations x104
maximum correlation0.806491271481046
optimal lambda(x)-0.69
Residual SD (orginial)11259.3835612039
Residual SD (transformed)11208.8904627105

\begin{tabular}{lllllllll}
\hline
Box-Cox Linearity Plot \tabularnewline
# observations x & 104 \tabularnewline
maximum correlation & 0.806491271481046 \tabularnewline
optimal lambda(x) & -0.69 \tabularnewline
Residual SD (orginial) & 11259.3835612039 \tabularnewline
Residual SD (transformed) & 11208.8904627105 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24294&T=1

[TABLE]
[ROW][C]Box-Cox Linearity Plot[/C][/ROW]
[ROW][C]# observations x[/C][C]104[/C][/ROW]
[ROW][C]maximum correlation[/C][C]0.806491271481046[/C][/ROW]
[ROW][C]optimal lambda(x)[/C][C]-0.69[/C][/ROW]
[ROW][C]Residual SD (orginial)[/C][C]11259.3835612039[/C][/ROW]
[ROW][C]Residual SD (transformed)[/C][C]11208.8904627105[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24294&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24294&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 x104
maximum correlation0.806491271481046
optimal lambda(x)-0.69
Residual SD (orginial)11259.3835612039
Residual SD (transformed)11208.8904627105



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