Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_boxcoxlin.wasp
Title produced by softwareBox-Cox Linearity Plot
Date of computationWed, 12 Nov 2008 11:47:38 -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/t1226515710s3m63glwb4phsy1.htm/, Retrieved Sun, 19 May 2024 12:37:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=24377, Retrieved Sun, 19 May 2024 12:37:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsSeverijns Britt
Estimated Impact191
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Bivariate Kernel Density Estimation] [Variuos EDA topic...] [2008-11-09 13:17:45] [3548296885df7a66ea8efc200c4aca50]
F RMPD    [Box-Cox Linearity Plot] [various EDA topic...] [2008-11-12 18:47:38] [78308c9f3efc33d1da821bcd963df161] [Current]
Feedback Forum
2008-11-23 16:12:05 [Aurélie Van Impe] [reply
Een box cox lineairity plot heeft te maken met transformatie van de gegevens. Men doet een transformatie op de gegevens om deze beter te kunnen benaderen, om ze mooier verdeeld te maken zodat er duidelijker een verband te bespeuren is, mocht er een zijn. Normaal gezien krijg je dan in zo'n plot een bergparabool te zien. De hoogste waarde die je ziet in die plot, zou dan de beste benadering zijn voor de curve van de getransformeerde gegevens. Maar in dit geval zie je geen bergparabool, maar een stijgende rechte. Dit wijst er dus op dat er nog geen hoogste waarde bereikt is. Bijgevolg heeft de transformatie maar weinig effect op de gegevens gehad. Dit zie je ook in de twee grafieken daaronder: er is bijna geen verschil merkbaar tussen de grafiek van de original data, en die van de transformed data.
2008-11-23 16:19:04 [Alexander Hendrickx] [reply
2008-11-23 16:19:10 [Alexander Hendrickx] [reply
De transformatie met de box cox linearity plot geeft weer dat er nog geen maximum bereikt is omdat de rechte blijft stijgen. Men gebruikt de transformatie met de box cox linearity plot om de correlatie van gegevens op meer lineaire manier voor te stellen. Hier is er bijna geen verschil tussen de oorspronkelijke en de getransformeerde.
2008-11-23 17:45:57 [7bf28d4d60530086dbc44ae6b648927e] [reply
Met een box-cox linearity plot gaan we de x-variable transformeren zodat de scatterplot lineair wordt. Op het punt waar de curve een maximum heeft vormt de beste transformatie van x. Hier is er geen maximum te zien. De transformatie heeft dus weinig effect.

Post a new message
Dataseries X:
344744
338653
327532
326225
318672
317756
337302
349420
336923
330758
321002
320820
327032
324047
316735
315710
313427
310527
330962
339015
341332
339092
323308
325849
330675
332225
331735
328047
326165
327081
346764
344190
343333
345777
344094
348609
354846
356427
353467
355996
352487
355178
374556
375021
375787
372720
364431
370490
376974
377632
378205
370861
369167
371551
382842
381903
384502
392058
384359
388884
386586
387495
385705
378670
377367
376911
389827
387820
387267
380575
372402
376740
377795
376126
370804
367980
367866
366121
379421
378519
372423
355072
344693
342892
344178
337606
327103
323953
316532
306307
327225
329573
313761
307836
300074
304198
306122
300414
292133
290616
280244
285179
305486
305957
Dataseries Y:
492865
480961
461935
456608
441977
439148
488180
520564
501492
485025
464196
460170
467037
460070
447988
442867
436087
431328
484015
509673
512927
502831
470984
471067
476049
474605
470439
461251
454724
455626
516847
525192
522975
518585
509239
512238
519164
517009
509933
509127
500857
506971
569323
579714
577992
565464
547344
554788
562325
560854
555332
543599
536662
542722
593530
610763
612613
611324
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274
560576
548854
531673
525919
511038
498662
555362
564591
541657
527070
509846
514258
516922
507561
492622
490243
469357
477580
528379
533590




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24377&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 x104
maximum correlation0.804115215697371
optimal lambda(x)2
Residual SD (orginial)32266.1102267427
Residual SD (transformed)31474.7001563901

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24377&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.804115215697371
optimal lambda(x)2
Residual SD (orginial)32266.1102267427
Residual SD (transformed)31474.7001563901



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