Home » date » 2010 » Dec » 28 »

*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: Tue, 28 Dec 2010 21:00:25 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4.htm/, Retrieved Tue, 28 Dec 2010 21:58:03 +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/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
548604 563668 586111 604378 600991 544686 537034 551531 563250 574761 580112 575093 557560 564478 580523 596594 586570 536214 523597 536535 536322 532638 528222 516141 501866 506174 517945 533590 528379 477580 469357 490243 492622 507561 516922 514258 509846 527070 541657 564591 555362 498662 511038 525919 531673 548854 560576 557274 565742
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
1548604548604000
2563668562016.947440278704.3455286454551651.052559722270.639639182814211
3586111580587.3701851851179.826513238995523.629814815531.32250295302630
4604378599693.4499050421327.170004504754684.550094957891.37853242285227
5600991601398.7338890131329.08392847948-407.7338890128370.0290542150589399
6544686556523.9876807291073.30169941725-11837.9876807288-3.54876999359405
7537034537049.222147274952.075417468482-15.2221472740840-1.57803770617811
8551531546147.113359071000.478874954435383.886640930470.625573455780406
9563250559557.272815741073.677341848063692.727184260240.953025681362728
10574761571790.0474261139.016559286202970.952573999940.856977807592458
11580112578528.6191844391171.601866579921583.380815561050.430020595573834
12575093575649.4319641691148.16509997577-556.431964169046-0.311078881348947
13557560571421.2971577011349.79472472095-13861.2971577006-0.471200136501134
14564478568188.4829153251283.03565245604-3710.48291532461-0.32323754592142
15580523576746.4516226861415.52973978163776.548377313810.533231188285758
16596594589423.7098811591520.440636003647170.290118840850.861826031391642
17586570581622.3794503721479.565658412864947.62054962772-0.715940513077779
18536214553065.4572339611377.66476117585-16851.4572339609-2.30570576608185
19523597530088.1128744851289.78744144588-6491.11287448514-1.86896203968085
20536535530412.3882944991286.061940858916122.61170550146-0.0740821968556601
21536322533617.2861861721293.815570365072704.713813828380.147239612346936
22532638532136.1223989021282.01949789657501.877601098182-0.213001426720579
23528222527642.9840289591260.65960189303579.015971040655-0.44324080235284
24516141518326.2664406721270.60730664961-2185.26644067168-0.811547659722004
25501866514950.1032257721325.25343203174-13084.1032257723-0.370839965838765
26506174513145.2695680851306.43455297191-6971.26956808448-0.233418623836777
27517945516861.073707661336.646018584461083.926292339950.178405386398126
28533590522681.8481197951377.6647406690210908.15188020550.341535753705118
29528379517987.6748276281346.8775245385910391.3251723717-0.466003285148121
30477580496454.696018571271.38380308250-18874.69601857-1.75634529924390
31469357480367.358159711218.61067102278-11010.3581597097-1.33207411105833
32490243482446.8494430231221.442512798947796.150556977270.0660522630845694
33492622487522.8479682931235.286116051625099.152031707460.295784921494092
34507561500922.0965361941278.324527071966638.903463805740.933572815125066
35516922511150.7341835751297.221094349755771.265816425090.686378408821981
36514258515156.2127083481292.52187393446-898.2127083475120.208071963458438
37509846520906.7565931351271.51687832713-11060.75659313490.346934361529854
38527070532181.7555314341307.98800886166-5111.755531433570.75607371720059
39541657540702.4992097961373.12762803159954.5007902039150.539284885910175
40564591549486.778808431433.8918016326915104.22119156960.563200775250767
41555362542173.0038574751386.6428849874413188.9961425245-0.670534840718818
42498662520851.2293134061305.85520934167-22189.2293134055-1.74299882216345
43511038520502.2012406611300.94174224817-9464.20124066087-0.127006889914247
44525919519501.2477261231293.943440327156417.75227387652-0.176646543200523
45531673526930.573053611313.483106144624742.426946389630.470848519105573
46548854540039.1385149521346.547949807138814.8614850480.904969652727832
47560576552145.3798737631359.868896910958430.6201262370.824863991198845
48557274558852.5380533091352.93998815335-1578.538053309250.410785419128755
49565742575097.1209182931324.98151124578-9355.120918292651.14821707539112
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/1lc4c1293570021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/1lc4c1293570021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/2ellf1293570021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/2ellf1293570021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/3ellf1293570021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/3ellf1293570021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/46uk01293570021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/46uk01293570021.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/56uk01293570021.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569883j9zj9zu9rlwtkn4/56uk01293570021.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