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 computationSun, 13 Dec 2009 06:15:09 -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/2009/Dec/13/t12607101837r4cze51agjz9f5.htm/, Retrieved Sun, 28 Apr 2024 16:01:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=67264, Retrieved Sun, 28 Apr 2024 16:01:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact147
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Box-Cox Linearity Plot] [3/11/2009] [2009-11-02 21:47:57] [b98453cac15ba1066b407e146608df68]
-    D  [Box-Cox Linearity Plot] [WS6 box cox] [2009-11-06 12:23:28] [8b1aef4e7013bd33fbc2a5833375c5f5]
-    D      [Box-Cox Linearity Plot] [PAPER BOX BOX] [2009-12-13 13:15:09] [f0f26816ac6124f58333f11f6c174000] [Current]
- R  D        [Box-Cox Linearity Plot] [Box-Cox_Linearity...] [2009-12-29 13:15:31] [2663058f2a5dda519058ac6b2228468f]
Feedback Forum

Post a new message
Dataseries X:
100.00
98.04
95.10
92.16
90.20
89.22
94.12
100.00
100.00
98.04
97.06
97.06
97.06
95.10
93.14
92.16
91.18
91.18
97.06
102.94
103.92
103.92
102.94
103.92
105.88
105.88
104.90
103.92
103.92
105.88
111.76
119.61
121.57
121.57
120.59
121.57
122.55
122.55
121.57
120.59
119.61
118.63
123.53
129.41
131.37
129.41
126.47
125.49
124.51
123.53
121.57
118.63
117.65
116.67
122.55
129.41
131.37
130.39
127.45
126.47
127.45
126.47
123.53
121.57
118.63
116.67
120.59
127.45
127.45
123.53
119.61
118.63
117.65
115.69
113.73
111.76
109.80
109.80
115.69
122.55
123.53
121.57
118.63
117.65
117.65
116.67
115.69
112.75
110.78
109.80
113.73
119.61
119.61
114.71
109.80
107.84
106.86
105.88
102.94
100.00
98.04
97.06
100.98
104.90
101.96
99.02
95.10
92.16
87.25
82.35
79.41
81.37
79.41
78.43
85.29
90.20
88.24
87.25
83.33
79.41
73.53
69.61
67.65
69.61
68.63
65.69
68.63
71.57
75.49
82.35
82.35
86.27
89.22
88.24
84.31
77.45
75.49
76.47
90.20
92.16
90.20
85.29
82.35
84.31
88.24
89.22
85.29
80.39
77.45
77.45
89.22
92.16
92.16
89.22
88.24
91.18
97.06
96.08
91.18
81.37
78.43
83.33
101.96
108.82
106.86
98.04
90.20
90.20
93.14
94.12
93.14
89.22
87.25
88.24
99.02
100.98
100.00
94.12
90.20
91.18
92.16
92.16
90.20
88.24
88.24
88.24
96.08
98.04
96.08
91.18
88.24
88.24
89.22
89.22
89.22
90.20
86.27
81.37
82.35
79.41
75.49
77.45
77.45
78.43
77.45
74.51
69.61
66.67
63.73
67.65
80.39
85.29
81.37
77.45
73.53
76.47
81.37
82.35
80.39
75.49
70.59
71.57
79.41
83.33
Dataseries Y:
100.00
100.78
101.24
102.35
102.41
102.67
102.54
102.74
103.07
103.39
103.72
103.91
104.37
104.89
105.61
106.00
106.13
106.20
106.26
106.33
106.98
107.44
107.50
107.57
107.63
108.15
108.35
109.07
109.39
109.78
109.98
110.18
110.31
110.57
110.63
110.70
110.76
111.15
111.48
112.13
112.13
112.20
112.20
112.46
112.85
113.31
113.37
113.37
113.44
113.89
114.16
114.74
114.81
114.22
114.55
114.74
115.26
114.87
114.87
114.94
115.00
115.98
116.44
117.03
117.09
117.16
117.22
117.22
117.29
117.35
117.55
117.68
117.68
118.26
118.66
119.05
119.18
119.44
119.77
119.83
119.90
119.96
120.09
120.29
120.35
121.27
121.72
122.37
122.50
122.57
122.64
122.83
122.90
122.96
122.96
123.03
123.03
123.55
123.94
125.18
125.57
125.90
126.22
126.48
126.68
127.14
127.14
127.14
127.14
127.53
127.85
127.98
127.98
127.98
127.98
128.51
128.96
129.16
129.29
129.48
129.55
130.14
130.46
131.31
131.90
132.35
132.75
132.75
133.07
133.14
133.27
133.40
133.59
133.79
134.18
134.70
134.96
135.09
135.55
135.68
136.01
136.07
136.33
136.40
136.79
136.86
136.92
136.99
137.51
137.90
138.10
138.29
138.42
138.55
138.88
139.20
139.40
139.60
139.79
140.12
140.25
140.83
141.16
141.49
141.68
141.88
142.14
142.27
142.60
142.79
143.05
143.77
144.10
144.16
144.68
144.81
144.94
145.14
145.40
145.53
145.73
146.12
146.84
147.10
147.36
147.62
147.75
148.08
148.27
148.60
148.79
148.99
149.05
149.25
149.38
149.45
149.58
149.77
149.97
150.03
150.16
150.55
150.68
151.14
151.27
151.99
153.36
153.95
154.53
154.66
154.92
155.38
155.84
155.97
156.56
156.69
156.88
157.01
157.27
157.47
157.99
158.45
158.64
159.10




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67264&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]1 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=67264&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67264&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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







Box-Cox Linearity Plot
# observations x224
maximum correlation0.655361185361451
optimal lambda(x)0.13
Residual SD (orginial)12.2975573183441
Residual SD (transformed)12.2602205992437

\begin{tabular}{lllllllll}
\hline
Box-Cox Linearity Plot \tabularnewline
# observations x & 224 \tabularnewline
maximum correlation & 0.655361185361451 \tabularnewline
optimal lambda(x) & 0.13 \tabularnewline
Residual SD (orginial) & 12.2975573183441 \tabularnewline
Residual SD (transformed) & 12.2602205992437 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67264&T=1

[TABLE]
[ROW][C]Box-Cox Linearity Plot[/C][/ROW]
[ROW][C]# observations x[/C][C]224[/C][/ROW]
[ROW][C]maximum correlation[/C][C]0.655361185361451[/C][/ROW]
[ROW][C]optimal lambda(x)[/C][C]0.13[/C][/ROW]
[ROW][C]Residual SD (orginial)[/C][C]12.2975573183441[/C][/ROW]
[ROW][C]Residual SD (transformed)[/C][C]12.2602205992437[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67264&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67264&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 x224
maximum correlation0.655361185361451
optimal lambda(x)0.13
Residual SD (orginial)12.2975573183441
Residual SD (transformed)12.2602205992437



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