Home » date » 2010 » Dec » 10 »

*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, 10 Dec 2010 19:01:52 +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/10/t1292007636whb8xjyuct42or4.htm/, Retrieved Fri, 10 Dec 2010 20:00:38 +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/10/t1292007636whb8xjyuct42or4.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 «
13328 12873 14000 13477 14237 13674 13529 14058 12975 14326 14008 16193 14483 14011 15057 14884 15414 14440 14900 15074 14442 15307 14938 17193 15528 14765 15838 15723 16150 15486 15986 15983 15692 16490 15686 18897 16316 15636 17163 16534 16518 16375 16290 16352 15943 16362 16393 19051 16747 16320 17910 16961 17480 17049 16879 17473 16998 17307 17418 20169 17871 17226 19062 17804 19100 18522 18060 18869 18127 18871 18890 21263 19547 18450 20254 19240 20216 19420 19415 20018 18652 19978 19509 21971
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
11332813328000
21287313200.60963673793.82153253273492-327.609636737904-1.30910990853883
31400013460.252677626221.9988247230845539.7473223738391.31766721298443
41347713535.986921978626.277874817128-58.9869219785510.311902103707869
51423713789.380664371642.1622676227788447.6193356283611.58143733562182
61367413834.07859266142.3048950847059-160.0785926609670.0192400330340184
71352913756.194252922936.7695972831542-227.194252922852-0.93687537822856
81405813824.108149938338.0414014924584233.8918500617210.243932471769008
91297513582.498402565827.0307066217839-607.498402565783-2.18563596938166
101432613729.74698913131.8414502980676596.2530108690010.935635721837499
111400813869.994954267936.3416485498737138.0050457321040.839892802844782
121619314657.751419039468.7552130932521535.248580960585.79778378158836
131448314940.968715151573.377380178188-457.9687151515151.70441403489681
141401114973.305470069872.3109666910293-962.30547006981-0.329020889326419
151505714910.204235849966.7406429671612146.795764150072-1.01366963348165
161488414966.766587788966.2096087984396-82.7665877888551-0.0721892393503844
171541414983.385164048163.3971195434108430.614835951888-0.352185117886043
181444014841.901730363651.7598613125289-401.901730363601-1.49386943826633
191490014877.572516836450.878192210586422.4274831636239-0.11989603799183
201507414855.283067544147.0434594142997218.716932455922-0.550705464864121
211444214996.139014345951.7712115307658-554.1390143458650.707319375157739
221530715086.874503974553.6732623549166220.1254960254660.293174801681171
231493815227.86819776757.8172251877867-289.8681977670310.655220534435506
241719315465.188546523666.11922078117821727.811453476431.34613437870652
251552815699.357543743973.7857505155111-171.3575437439281.2638271906867
261476515768.897498343173.58717256472-1003.89749834307-0.0318833447756195
271583815770.225589140270.023411549570567.7744108598067-0.535995493635427
281572315767.794422100466.2590562552327-44.7944221004366-0.529671473757331
291615015725.550146570460.4288018101536424.449853429631-0.789148680241657
301548615780.155551067860.1118070078565-294.15555106783-0.0425744359084186
311598615877.229190655862.1179397652223108.7708093441510.272498047473189
321598315928.548414462661.539014449832554.4515855374259-0.080045018674125
331569216100.192253544667.3476244206017-408.1922535446310.816983219827962
341649016281.836470198773.282935704625208.1635298013040.846801007906598
351568616325.101779372471.7437757984775-639.101779372384-0.222074109652116
361889716660.862906361385.18381455101682236.137093638731.95349648855418
371631616722.821186274684.001356143972-406.821186274629-0.172023175770423
381563616713.577098998579.2168401989263-1077.57709899848-0.690276606771244
391716316831.775704409681.2428623161003331.2242955903970.28759250194718
401653416796.036142030375.0810464605809-262.036142030262-0.859207161801417
411651816595.763351627160.4295338298941-77.7633516271351-2.01772615679465
421637516599.693555723657.4074952253095-224.693555723638-0.414444665990574
431629016513.574055126349.7271504264102-223.574055126299-1.05580417219991
441635216484.458773923445.5213984997473-132.458773923353-0.581262823896788
451594316491.132290829143.4596829296471-548.132290829068-0.286538996885463
461636216429.665229881137.9215767276276-67.66522988113-0.773355953674206
471639316668.180402153948.4615484439636-275.1804021539161.47741619524434
481905116787.462485491852.1734542063232263.537514508210.521645127149997
491674716927.772204648156.7927429729416-180.7722046480870.649524986414088
501632017113.104187634963.5443813423608-793.1041876349240.947300972692673
511791017270.620848608568.4980147386156639.3791513915480.691871245273978
521696117247.865518912163.6694078159669-286.865518912085-0.670858742767283
531748017325.068199196864.3876898548985154.9318008031660.0993984412830568
541704917312.027943269960.2710376907534-263.027943269908-0.568791384738454
551687917242.323408941353.3581125867458-363.323408941296-0.955697432450974
561747317351.463582285556.3226245407205121.5364177145260.410503251553979
571699817478.672203174560.0841652725418-480.6722031745440.521762647600326
581730717568.384525028261.6536534916854-261.3845250281650.218014324565491
591741817693.239267771664.9966171301543-275.2392677715860.464905000473736
602016917860.159533255270.38299528764092308.840466744830.749746310477573
611787118029.545663498575.6143967610804-158.545663498480.72843192824773
621722618110.440497746875.8935798972956-884.4404977467530.0388555961946465
631906218234.470422182778.4411890649875827.5295778173340.354112665061781
641780418242.099462812774.6892922338283-438.09946281268-0.520666569347948
651910018466.823586569682.6460233575957633.1764134303851.10276756279848
661852218650.023008316287.9815990619847-128.0230083161970.73907938964685
671806018689.526141939585.4088319075327-629.526141939464-0.35643001941373
681886918776.59630809785.496982398194892.40369190296530.0122184598281389
691812718804.521191629582.44351504601-677.521191629486-0.423459023475086
701887118980.913685941787.4236961553463-109.9136859417350.690942602132287
711889019161.226992806692.3453763200119-271.2269928065640.683055885564242
722126319208.340579649989.94954400921222054.65942035008-0.332602323904371
731954719420.026758559496.3971823762235126.9732414406260.895246517153252
741845019505.233763196995.804423108994-1055.23376319688-0.0822976503927405
752025419548.793830308993.0361720161932705.206169691117-0.384204563290023
761924019679.906316471595.0543701994513-439.9063164714720.279966476091825
772021619740.470289187593.2257284919133475.529710812537-0.253563785388247
781942019722.554470476787.3320878930281-302.554470476721-0.81706657661076
791941519854.626327844489.7046991187274-439.6263278443520.32893991248899
802001819957.113472231790.382538836777460.88652776826080.0939909063552975
811865219856.404677492580.2503853612168-1204.40467749255-1.40517489469044
821997819952.881466250581.11061641514625.11853374949520.11931478439592
831950919964.528393073577.428599412836-455.528393073551-0.510745644662623
842197120006.573339485175.55323614420811964.42666051494-0.260161641720041
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/1x4iq1292007707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/1x4iq1292007707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/2x4iq1292007707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/2x4iq1292007707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/37dht1292007707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/37dht1292007707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/404hw1292007707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/404hw1292007707.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/504hw1292007707.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1292007636whb8xjyuct42or4/504hw1292007707.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
bitmap(file='test1.png')
plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time')
grid()
dev.off()
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='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