Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_boxcoxnorm.wasp
Title produced by softwareBox-Cox Normality Plot
Date of computationTue, 11 Nov 2008 16:46:30 -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/t1226447269y7kfw4wjkkj4x0l.htm/, Retrieved Mon, 20 May 2024 07:00:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=24011, Retrieved Mon, 20 May 2024 07:00:30 +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)
-     [Box-Cox Linearity Plot] [Box-Cox] [2008-11-11 14:29:04] [adb6b6905cde49db36d59ca44433140d]
- RM D  [Box-Cox Normality Plot] [Box-Cox Normality...] [2008-11-11 14:44:37] [adb6b6905cde49db36d59ca44433140d]
F    D      [Box-Cox Normality Plot] [Box-Cox Normality...] [2008-11-11 23:46:30] [d592f629d96b926609f311957d74fcca] [Current]
F RMPD        [Maximum-likelihood Fitting - Normal Distribution] [Normal Distribution ] [2008-11-12 15:48:53] [b478325fa744e3f2fc16a7222294469c]
F    D          [Maximum-likelihood Fitting - Normal Distribution] [Opdracht3_Q5] [2008-11-12 15:58:44] [3f66c6f083b1153972739491b89fa2dd]
F   PD          [Maximum-likelihood Fitting - Normal Distribution] [task 8 maximum li...] [2008-11-12 20:17:58] [1eab65e90adf64584b8e6f0da23ff414]
- RMPD            [Univariate Data Series] [Paper 4.2.1] [2008-12-18 18:27:01] [1eab65e90adf64584b8e6f0da23ff414]
- RMPD            [Histogram] [4.2.1] [2008-12-18 18:38:08] [1eab65e90adf64584b8e6f0da23ff414]
-   PD            [Maximum-likelihood Fitting - Normal Distribution] [4.2.1] [2008-12-18 18:48:23] [1eab65e90adf64584b8e6f0da23ff414]
- RMPD            [Box-Cox Normality Plot] [4.2.1] [2008-12-18 18:51:19] [1eab65e90adf64584b8e6f0da23ff414]
- RMP               [Standard Deviation-Mean Plot] [4.2.2] [2008-12-19 10:25:45] [1eab65e90adf64584b8e6f0da23ff414]
- RMP               [Variance Reduction Matrix] [4.2.2 variantie rdm] [2008-12-19 10:48:41] [1eab65e90adf64584b8e6f0da23ff414]
- RMP               [(Partial) Autocorrelation Function] [4.2.2] [2008-12-19 10:57:29] [1eab65e90adf64584b8e6f0da23ff414]
-   P                 [(Partial) Autocorrelation Function] [4.2.2 D1] [2008-12-19 14:00:41] [1eab65e90adf64584b8e6f0da23ff414]
- RMP                 [Spectral Analysis] [4.2.2 spect] [2008-12-19 14:09:27] [1eab65e90adf64584b8e6f0da23ff414]
- RMP                 [Spectral Analysis] [4.2.2 spec 1] [2008-12-19 14:13:18] [1eab65e90adf64584b8e6f0da23ff414]
- RMP                 [ARIMA Backward Selection] [4.3] [2008-12-19 14:24:21] [1eab65e90adf64584b8e6f0da23ff414]
- RMP                   [(Partial) Autocorrelation Function] [4.2.2] [2008-12-19 17:44:20] [1eab65e90adf64584b8e6f0da23ff414]
- RMP                   [(Partial) Autocorrelation Function] [4.2.2 cor] [2008-12-19 17:50:05] [1eab65e90adf64584b8e6f0da23ff414]
- RMP                   [ARIMA Forecasting] [4.3] [2008-12-19 18:01:56] [1eab65e90adf64584b8e6f0da23ff414]
-   PD                [(Partial) Autocorrelation Function] [4.2.2 pacf] [2008-12-19 16:27:58] [1eab65e90adf64584b8e6f0da23ff414]
F    D        [Box-Cox Normality Plot] [box cox normal plot2] [2008-11-13 08:41:37] [3b5d63cebdc58ed6c519cdb5b6a36d46]
Feedback Forum
2008-11-19 22:35:10 [Evelien Blockx] [reply
Q3
Ik heb geprobeerd om de berekening van Q3 te maken met je cijfers.
Als Yt nam ik de Dow Jones Industrial
Als Xt nam ik London Brent Oil

Deze vul je in in de R-module. Je hoeft niets in de R-code aan te passen.

http://www.freestatistics.org/blog/date/2008/Nov/19/t1227125983ahb49l95yy9u0mo.htm

Met de Box Cox transformatie kan je eenvoudig tijdreeksen transformeren. Zo ga je proberen een lineair verband te creëren met behulp van de transformatie.

Je zoekt het maximum van de Lambda op de Box Cox Linearity plot. Er is duidelijk een maximum te zien op deze grafiek (-0,58). Dit Lambda-cijfer wordt gebruikt om het verband te linealiseren. Bovendien ligt de correlatie op de y-as tussen 0,500 en 0,665. Dat is een redelijk verschil.

Daarna kan je de Linear Fit van de originele en getransformeerde data met elkaar vergelijken en kijken of de transformatie de data normaliseert.

Q4
Er is niet duidelijk een maximum zichtbaar in de grafiek. Het is niet zeker dat -2 het maximale lambda cijfer is. Volgens mij kan je dus geen conclusies trekken hieruit.

Post a new message
Dataseries X:
9682.35
9762.12
10124.63
10540.05
10601.61
10323.73
10418.40
10092.96
10364.91
10152.09
10032.80
10204.59
10001.60
10411.75
10673.38
10539.51
10723.78
10682.06
10283.19
10377.18
10486.64
10545.38
10554.27
10532.54
10324.31
10695.25
10827.81
10872.48
10971.19
11145.65
11234.68
11333.88
10997.97
11036.89
11257.35
11533.59
11963.12
12185.15
12377.62
12512.89
12631.48
12268.53
12754.80
13407.75
13480.21
13673.28
13239.71
13557.69
13901.28
13200.58
13406.97
12538.12
12419.57
12193.88
12656.63
12812.48
12056.67
11322.38
11530.75
11114.08




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

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







Box-Cox Normality Plot
# observations x60
maximum correlation0.783865639625609
optimal lambda-2

\begin{tabular}{lllllllll}
\hline
Box-Cox Normality Plot \tabularnewline
# observations x & 60 \tabularnewline
maximum correlation & 0.783865639625609 \tabularnewline
optimal lambda & -2 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=24011&T=1

[TABLE]
[ROW][C]Box-Cox Normality Plot[/C][/ROW]
[ROW][C]# observations x[/C][C]60[/C][/ROW]
[ROW][C]maximum correlation[/C][C]0.783865639625609[/C][/ROW]
[ROW][C]optimal lambda[/C][C]-2[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=24011&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=24011&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 Normality Plot
# observations x60
maximum correlation0.783865639625609
optimal lambda-2



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(qnorm(ppoints(x), mean=0, sd=1),x1)
if (mx < c[i])
{
mx <- c[i]
mxli <- l[i]
}
}
c
mx
mxli
if (mxli != 0)
{
x1 <- (x^mxli - 1) / mxli
} else {
x1 <- log(x)
}
bitmap(file='test1.png')
plot(l,c,main='Box-Cox Normality Plot',xlab='Lambda',ylab='correlation')
mtext(paste('Optimal Lambda =',mxli))
grid()
dev.off()
bitmap(file='test2.png')
hist(x,main='Histogram of Original Data',xlab='X',ylab='frequency')
grid()
dev.off()
bitmap(file='test3.png')
hist(x1,main='Histogram of Transformed Data',xlab='X',ylab='frequency')
grid()
dev.off()
bitmap(file='test4.png')
qqnorm(x)
qqline(x)
grid()
mtext('Original Data')
dev.off()
bitmap(file='test5.png')
qqnorm(x1)
qqline(x1)
grid()
mtext('Transformed Data')
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Box-Cox Normality 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',header=TRUE)
a<-table.element(a,mxli)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')