Home » date » 2009 » Dec » 04 »

structurele tijdreeksanalyse

*The author of this computation has been verified*
R Software Module: /rwasp_structuraltimeseries.wasp (opens new window with default values)
Title produced by software: Structural Time Series Models
Date of computation: Fri, 04 Dec 2009 12:23:56 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh.htm/, Retrieved Fri, 04 Dec 2009 20:26:34 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
107.11 107.57 107.81 108.75 109.43 109.62 109.54 109.53 109.84 109.67 109.79 109.56 110.22 110.40 110.69 110.72 110.89 110.58 110.94 110.91 111.22 111.09 111.00 111.06 111.55 112.32 112.64 112.36 112.04 112.37 112.59 112.89 113.22 112.85 113.06 112.99 113.32 113.74 113.91 114.52 114.96 114.91 115.30 115.44 115.52 116.08 115.94 115.56 115.88 116.66 117.41 117.68 117.85 118.21 118.92 119.03 119.17 118.95 118.92 118.90
 
Output produced by software:


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


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
1107.11107.11000
2107.57107.5461321633120.02487104156269750.02386783668821450.80932357825462
3107.81107.7853560694240.028424485122120.02464393057589530.660158303308612
4108.75108.7221422422380.04914887659664630.02785775776171722.78846269843622
5109.43109.3999818201680.06721413849544260.03001817983169201.92390558859739
6109.62109.5895756954730.07141010770817370.03042430452748540.373391103144814
7109.54109.5100568105920.06545811916383310.0299431894082669-0.459211087677599
8109.53109.5002860266730.06213581553486810.0297139733274101-0.228293953230411
9109.84109.8095694817160.07411282092521160.03043051828388470.748212577696612
10109.67109.6402383496000.06137193430643320.0297616503998263-0.735388071316504
11109.79109.7600866499440.06463505902940240.02991335005565610.176293439538470
12109.56109.5308042356670.04732866421171550.0291957643325901-0.884515685621176
13110.22110.2405592398380.0695504960309077-0.02055923983831252.3772269632765
14110.4110.3961086424310.07602143597556920.003891357568854290.219720051864291
15110.69110.6859348458700.0899891042618260.004065154129788580.640144318683956
16110.72110.7159802953870.08595884382824920.00401970461350254-0.179281923321855
17110.89110.8859210064970.09174421996155980.004078993502594870.250940159190765
18110.58110.5761845097210.06351206823377140.00381549027873475-1.19865191998523
19110.94110.9360039505180.0847145015195750.003996049482146560.884018034400308
20110.91110.9060687405680.07638875071260390.00393125943161672-0.341840065690101
21111.22111.2159464953250.09355778403986480.004053504674572890.695799014551623
22111.09111.0860547901750.07695198070338240.00394520982473786-0.665572913361689
23111110.9961296025820.06443851608121720.0038703974178266-0.496866304380876
24111.06111.0561314412940.06410328458790020.00386855870591091-0.0132053727894251
25111.55111.5084478306620.09141111775474820.04155216933818411.26395208859022
26112.32112.3132225941410.1479382768466140.006777405859397851.93598588472383
27112.64112.6332001238720.1611444440062790.006799876127879510.511574972303186
28112.36112.3532533025900.1271482388191440.00674669741047049-1.31139231639904
29112.04112.0333030368440.0925708757107370.00669696315605846-1.32904900082609
30112.37112.3632786767500.1109844920464920.006721323249752340.705619178937622
31112.59112.5832683614050.1194600139912920.006731638595380280.32395112996589
32112.89112.8832526091540.1335257361455750.006747390845698080.53644623471777
33113.22113.2132368045640.1488601367703740.006763195435757020.583748530658545
34112.85112.8432752797480.1083030357343430.0067247202520081-1.54149694762890
35113.06113.0532683288000.116262443418240.006731671199783860.302118108131986
36112.99112.9832800622810.1016685904666310.00671993771869417-0.553317003168438
37113.32113.3550483434190.122402313356986-0.03504834341861550.852793714384377
38113.74113.7340374052200.1426740711864150.005962594780071210.71485211291891
39113.91113.9040380887770.1448201260580720.005961911223466580.0811671446970093
40114.52114.514048731560.1813739212687290.005951268440100061.38170618435842
41114.96114.9540541834430.2017064970716680.005945816557352440.768171527454756
42114.91114.9040492947420.1819098584987570.00595070525752811-0.747605978788942
43115.3115.2940530183380.1982817432196680.005946981662442230.61804975136406
44115.44115.4340520575120.1936949716774200.0059479424880309-0.173100779246586
45115.52115.5140503307000.1847449529941610.0059496693003318-0.337678281972651
46116.08116.0740555813660.2142911072398760.005944418633923701.11451134619512
47115.94115.9340510144240.1863905734906720.00594898557588432-1.0522401694583
48115.56115.5540442884840.1417803572046940.00595571151553915-1.68216200287080
49115.88115.9212183068840.159388179443751-0.04121830688369020.701055604658623
50116.66116.6513723211100.2043192011191410.008627678889816641.61318168627207
51117.41117.4014030413180.2473148945654400.008596958682299181.62062785099945
52117.68117.6714042173030.2491024424662500.008595782696769110.0673727249895382
53117.85117.8414004398110.2428689311142990.00859956018895737-0.234926546174502
54118.21118.2014055925290.2520996815349790.00859440747056570.347867105878057
55118.92118.9114241485250.2881869949048360.00857585147470721.35991386955892
56119.03119.0214174967590.2741434909973540.00858250324107727-0.52919506096991
57119.17119.1614128838260.2635708728447140.0085871161735572-0.398390346991871
58118.95118.9413975654350.2254568750729720.00860243456487196-1.43614684198450
59118.92118.911390110990.2053218737509390.00860988901002041-0.758675210934209
60118.9118.8913840541640.1875617638212880.00861594583578748-0.669177455035412
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/13k0i1259954634.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/13k0i1259954634.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/2dj2g1259954634.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/2dj2g1259954634.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/37jt31259954634.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/37jt31259954634.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/47x4g1259954634.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/47x4g1259954634.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/5sowl1259954634.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259954787vmh2fr4stafanuh/5sowl1259954634.ps (open in new window)


 
Parameters (Session):
par1 = 12 ;
 
Parameters (R input):
par1 = 12 ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1)
nx <- length(x)
x <- ts(x,frequency=par1)
m <- StructTS(x,type='BSM')
m$coef
m$fitted
m$resid
mylevel <- as.numeric(m$fitted[,'level'])
myslope <- as.numeric(m$fitted[,'slope'])
myseas <- as.numeric(m$fitted[,'sea'])
myresid <- as.numeric(m$resid)
myfit <- mylevel+myseas
mylagmax <- nx/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(mylevel,na.action=na.pass,lag.max = mylagmax,main='Level')
acf(myseas,na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(myresid,na.action=na.pass,lag.max = mylagmax,main='Standardized Residals')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(mylevel,main='Level')
spectrum(myseas,main='Seasonal')
spectrum(myresid,main='Standardized Residals')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(mylevel,main='Level')
cpgram(myseas,main='Seasonal')
cpgram(myresid,main='Standardized Residals')
par(op)
dev.off()
bitmap(file='test1.png')
plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time',type='b')
grid()
dev.off()
bitmap(file='test5.png')
op <- par(mfrow = c(2,2))
hist(m$resid,main='Residual Histogram')
plot(density(m$resid),main='Residual Kernel Density')
qqnorm(m$resid,main='Residual Normal QQ Plot')
qqline(m$resid)
plot(m$resid^2, myfit^2,main='Sq.Resid vs. Sq.Fit',xlab='Squared residuals',ylab='Squared Fit')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Structural Time Series Model',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Level',header=TRUE)
a<-table.element(a,'Slope',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Stand. Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,mylevel[i])
a<-table.element(a,myslope[i])
a<-table.element(a,myseas[i])
a<-table.element(a,myresid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by