Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_edauni.wasp
Title produced by softwareUnivariate Explorative Data Analysis
Date of computationMon, 27 Oct 2008 14:34:48 -0600
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/Oct/27/t1225139730ujp8kjedqd6yhz0.htm/, Retrieved Fri, 17 May 2024 02:06:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=19585, Retrieved Fri, 17 May 2024 02:06:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact169
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Explorative Data Analysis] [Investigating dis...] [2007-10-22 19:45:25] [b9964c45117f7aac638ab9056d451faa]
F    D  [Univariate Explorative Data Analysis] [] [2008-10-26 17:27:53] [a4ee3bef49b119f4bd2e925060c84f5e]
F           [Univariate Explorative Data Analysis] [q7 - invest. distr.] [2008-10-27 20:34:48] [3762bf489501725951ad2579179cae2a] [Current]
-   P         [Univariate Explorative Data Analysis] [Q7 ] [2008-11-01 11:20:25] [4396f984ebeab43316cd6baa88a4fd40]
- R             [Univariate Explorative Data Analysis] [Q7] [2008-11-01 11:30:29] [4396f984ebeab43316cd6baa88a4fd40]
Feedback Forum
2008-11-03 11:09:31 [Astrid Sniekers] [reply
De student heeft de oefening niet helemaal correct uitgevoerd, maar hieronder vindt u hoe het wel zou moeten.

Om de validiteit van een model na te gaan moeten de volgende 4 assumptie getest worden.

- Assumptie 1 (are the data autocorrelated? (the model assumes no autocorrelation))
Dit heeft de student helemaal fout gedaan.

http://www.freestatistics.org/blog/date/2008/Nov/01/t122553846952n0d9brdkvl89z.htm

Om autocorrelatie te kunnen aflezen, kijken we niet naar de Run Sequence Plot (eerste grafiek) zoals de student heeft gedaan. Wel kijken we naar de laatste twee grafieken, namelijk: de Lag plot en de Autocorrelation Function.

De rechte lijn in de Lag plot-grafiek verloopt bijna plat, horizontaal. De puntenwolk ligt gespreid rond de lijn. Dit betekent dat de autocorrelatie BIJNA nul is. Als de autocorrelatie nul was, betekent dit dat er geen autocorrelatie is en dat de tijdreeks random zou zijn.

Als we bij het aantal lags (# lags) 36 ingeven, zien we op Autocorrelation Function-grafiek (de laatste grafiek) een eerste grote correlatie bij lag 12 en een tweede grote correlatie bij lag 24. Hieruit kunnen we besluiten dat er seizoensgebondenheid / seizoensgevoeligheid is!

 De tijdreeks is niet random en bevat seizoensgebonden autocorrelatie.

- Assumptie 2 (is the random component generated by a fixed distribution? (the model assumes a fixed distribution))
http://www.freestatistics.org/blog/date/2008/Nov/01/t122553846952n0d9brdkvl89z.htm

Aan de hand van de Histogram of x-grafiek kunnen we besluiten dat er een bijna normaalverdeling is.

De Density Plot-grafiek is de afgevlakte versie van de Histogram of x-grafiek. We hebben geen enkele reden om te zeggen dat hier geen normaalverdeling zou zijn. Dit vond de student ook.

 We hebben dus te maken met een gelijke spreiding.

Op de Normal Q-Q Plot-grafiek zien we dat de punten bijna allemaal mooi op een rechte lijn liggen. Dit betekent dat we dicht bij een normale verdeling aanleunen, ondanks het feit dat er bijna geen autocorrelatie is.

- Assumptie 3 (is the deterministic component constant? (the model assumes that the distribution has a fixed location))
http://www.freestatistics.org/blog/date/2008/Nov/01/t122553846952n0d9brdkvl89z.htm

We kijken naar de Run Sequence Plot-grafiek en niet naar de Normal Q-Q Plot zoals de student heeft gedaan. We kijken naar de lange termijn trend. Blijft het niveau constant? Volgens mij blijft het niveau constant.

- Assumptie 4 (does the random component have a fixed variation? (the model assumes a distribution with fixed variation))
http://www.freestatistics.org/blog/date/2008/Nov/01/t122553846952n0d9brdkvl89z.htm

In de Run Sequence Plot-grafiek kunnen we zien dat er een vaste spreiding is.

Yt = c + ct
ct (random component): dit kunnen we niet voorspellen, omdat dit normaal verdeeld is.
c (constante): dit kunnen we wel voorspellen.
Ft = Yt - ct = c = de voorspelling

We gaan het gemiddelde (23305.2083333333) als constante gebruiken. In de R-code vervangen we x door x - 23305.2083333333.

http://www.freestatistics.org/blog/date/2008/Nov/01/t1225539071d9goy9uwa4jd9pv.htm

Het gemiddelde ligt nu rond nul.

==> Besluit: het model is niet geldig, omdat niet aan alle validiteitvoorwaarden is voldaan.
2008-12-01 18:53:06 [0762c65deec3d397cd9f26b3749a0847] [reply
voor de eerste assumptie moest er niet gezien worden naar het run sequence plot maar wel naar de autocorrelation function vh lagplot. Omdat het aantal lags niet zijn aangepast (van niets naar 12 omdat men met maandelijkse gegevens werkt) krijg je de twee laatste grafieken niet te zien.

Post a new message
Dataseries X:
22780
17351
21382
24561
17409
11514
31514
27071
29462
26105
22397
23843
21705
18089
20764
25316
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698
31956
29506
34506
27165
26736
23691
18157
17328
18205
20995
17382
9367
31124
26551
30651
25859
25100
25778
20418
18688
20424
24776
19814
12738
31566
30111
30019
31934
25826
26835




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=19585&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







Descriptive Statistics
# observations72
minimum9367
Q118635.75
median23236.5
mean23305.2083333333
Q327094.5
maximum36438

\begin{tabular}{lllllllll}
\hline
Descriptive Statistics \tabularnewline
# observations & 72 \tabularnewline
minimum & 9367 \tabularnewline
Q1 & 18635.75 \tabularnewline
median & 23236.5 \tabularnewline
mean & 23305.2083333333 \tabularnewline
Q3 & 27094.5 \tabularnewline
maximum & 36438 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=19585&T=1

[TABLE]
[ROW][C]Descriptive Statistics[/C][/ROW]
[ROW][C]# observations[/C][C]72[/C][/ROW]
[ROW][C]minimum[/C][C]9367[/C][/ROW]
[ROW][C]Q1[/C][C]18635.75[/C][/ROW]
[ROW][C]median[/C][C]23236.5[/C][/ROW]
[ROW][C]mean[/C][C]23305.2083333333[/C][/ROW]
[ROW][C]Q3[/C][C]27094.5[/C][/ROW]
[ROW][C]maximum[/C][C]36438[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=19585&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=19585&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Descriptive Statistics
# observations72
minimum9367
Q118635.75
median23236.5
mean23305.2083333333
Q327094.5
maximum36438



Parameters (Session):
par1 = 0 ; par2 = 0 ;
Parameters (R input):
par1 = 0 ; par2 = 0 ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
x <- as.ts(x)
library(lattice)
bitmap(file='pic1.png')
plot(x,type='l',main='Run Sequence Plot',xlab='time or index',ylab='value')
grid()
dev.off()
bitmap(file='pic2.png')
hist(x)
grid()
dev.off()
bitmap(file='pic3.png')
if (par1 > 0)
{
densityplot(~x,col='black',main=paste('Density Plot bw = ',par1),bw=par1)
} else {
densityplot(~x,col='black',main='Density Plot')
}
dev.off()
bitmap(file='pic4.png')
qqnorm(x)
grid()
dev.off()
if (par2 > 0)
{
bitmap(file='lagplot.png')
dum <- cbind(lag(x,k=1),x)
dum
dum1 <- dum[2:length(x),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Lag plot, lowess, and regression line'))
lines(lowess(z))
abline(lm(z))
dev.off()
bitmap(file='pic5.png')
acf(x,lag.max=par2,main='Autocorrelation Function')
grid()
dev.off()
}
summary(x)
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Descriptive Statistics',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'# observations',header=TRUE)
a<-table.element(a,length(x))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'minimum',header=TRUE)
a<-table.element(a,min(x))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Q1',header=TRUE)
a<-table.element(a,quantile(x,0.25))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'median',header=TRUE)
a<-table.element(a,median(x))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'mean',header=TRUE)
a<-table.element(a,mean(x))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Q3',header=TRUE)
a<-table.element(a,quantile(x,0.75))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'maximum',header=TRUE)
a<-table.element(a,max(x))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')