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 computationMon, 05 Nov 2007 02:08:26 -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/2007/Nov/05/bgmwkif0n55w5zk1194253654.htm/, Retrieved Mon, 29 Apr 2024 04:36:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=452, Retrieved Mon, 29 Apr 2024 04:36:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsbox cox transformation, Q3
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Box-Cox Linearity Plot] [Box Cox transform...] [2007-11-05 09:08:26] [578856645eee7b4b8f74dcf589866e9b] [Current]
Feedback Forum

Post a new message
Dataseries X:
90,49
90,65
90,95
91,19
91,07
91,15
91,81
91,95
91,62
91,27
91,4
91,76
91,99
92,34
92,3
92,85
92,94
93,26
94,21
94,08
93,98
94,23
94,93
95,09
95,37
96,23
96,2
95,43
95,63
95,96
96,51
96,65
96,21
95,54
95,96
96,41
96,32
96,94
96,97
97,63
97,33
97,66
98,18
98,22
97,91
97,93
98,4
98,78
98,73
99,4
99,04
99,68
99,62
99,8
100,65
100,59
100,46
100,57
100,75
100,7
101,44
101,77
101,79
101,52
101,83
102,23
103,04
102,81
102,48
102,81
103,21
103,21
102,92
103,48
103,18
103,39
103,5
103,73
104,42
104,53
104,09
104,23
104,23
104,54
104,65
105,48
105,61
105,74
105,86
105,81
106,49
106,43
105,73
Dataseries Y:
91,25
91,5
91,68
91,81
91,84
91,93
92,08
92,11
92,26
92,28
92,39
92,46
92,82
93,16
93,33
93,51
93,56
93,67
93,76
93,88
94,01
94,21
94,31
94,4
94,9
95,31
95,52
95,68
95,91
95,97
96,15
96,34
96,42
96,54
96,72
96,81
97,19
97,5
97,71
97,86
98,04
98,2
98,25
98,41
98,56
98,62
98,75
98,71
99,05
99,52
99,71
99,8
100,01
99,99
100,12
100,15
100,27
100,42
100,43
100,5
100,95
101,26
101,42
101,68
101,75
101,89
102,07
102,22
102,45
102,62
102,67
102,86
104,78
104,87
105,06
105,14
105,32
105,54
105,68
105,77
106,07
106,03
106,13
106,28
106,61
106,74
107,01
107,1
107,28
107,4
107,59
107,69
107,78




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 7 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=452&T=0

[TABLE]
[ROW][C]Summary of compuational 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]7 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=452&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=452&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







Box-Cox Linearity Plot
# observations x93
maximum correlation0.990420323297415
optimal lambda(x)2
Residual SD (orginial)0.747655775318522
Residual SD (transformed)0.691982698999904

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=452&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 x93
maximum correlation0.990420323297415
optimal lambda(x)2
Residual SD (orginial)0.747655775318522
Residual SD (transformed)0.691982698999904



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