Home » date » 2010 » Dec » 27 »

STSM- NWWZ

*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: Mon, 27 Dec 2010 14:21:36 +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/27/t1293459639utm05iga9ejoh6w.htm/, Retrieved Mon, 27 Dec 2010 15:20:41 +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/27/t1293459639utm05iga9ejoh6w.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 «
206010 198112 194519 185705 180173 176142 203401 221902 197378 185001 176356 180449 180144 173666 165688 161570 156145 153730 182698 200765 176512 166618 158644 159585 163095 159044 155511 153745 150569 150605 179612 194690 189917 184128 175335 179566 181140 177876 175041 169292 166070 166972 206348 215706 202108 195411 193111 195198 198770 194163 190420 189733 186029 191531 232571 243477 227247 217859 208679 213188 216234 213586 209465 204045 200237 203666 241476 260307 243324 244460 233575 237217 235243 230354 227184 221678 217142 219452 256446 265845 248624 241114 229245 231805 219277 219313 212610 214771 211142 211457 240048 240636 230580 208795 197922 194596 194581 185686 178106 172608 167302 168053 202300 202388 182516 173476 166444 171297 169701 164182 161914 159612 151001 158114 186530 187069 174330 169362 166827 178037 186413 189226 191563 188906 186005 195309 223532 226899 etc...
 
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
1206010206010000
2198112200283.109783875-4599.66453597477-2171.10978387525-1.31862493573313
3194519193748.328553908-5840.01836266856770.671446091604-0.282704581494234
4185705186121.197379702-7042.21238172955-416.197379701553-0.266285485136702
5180173179779.939792294-6577.3041166279393.0602077062560.100414763351537
6176142175500.673487757-5060.68258219777641.3265122428430.33131406355305
7203401195581.76919621411592.63215167967819.230803785623.64116455374229
8221902220267.52803129820274.39189178711634.471968701761.89695465650162
9197378208923.594477999-687.947639494629-11545.5944779989-4.58051806555534
10185001188272.562463755-13919.8502749352-3271.56246375479-2.89134737528439
11176356174376.37284121-13904.16918949311979.627158790180.00342649964194933
12180449175624.246200397-3862.064339842834824.753799603422.1943189766364
13180144178532.751703064588.1746206685191611.248296935780.99606590438505
14173666176661.440211519-1013.96029136161-2995.4402115192-0.349336686643145
15165688166379.318227394-6849.97328929047-691.318227393939-1.27533801693679
16161570159465.133379099-6890.901627552862104.86662090063-0.00906384453138576
17156145154949.574815777-5367.121140056511195.425184223130.331971187353714
18153730159795.0330608171141.18771367786-6065.033060817191.41696783045283
19182698176580.40095741911110.62488948486117.599042580712.17910359713113
20200765190230.61064688112732.441790235510534.38935311870.354471068690958
21176512186814.7351748992412.59916954907-10302.7351748986-2.25486198332089
22166618173597.84789691-7574.44952242811-6979.84789690985-2.1824309524722
23158644161922.861439114-10192.0200172655-3278.86143911428-0.571983836040125
24159585155687.192825397-7670.608835942783897.807174602660.551977663250229
25163095157282.256953551-1756.22123993395812.743046449331.30007107989644
26159044157797.16322914-311.7248029535051246.836770859540.315023732176737
27155511155490.312843015-1564.7953248918320.6871569847786-0.273488418903559
28153745151963.478256056-2800.021898851331781.52174394361-0.271646001221344
29150569152270.458353671-832.518987696347-1701.45835367120.43028904246281
30150605160749.07487545048.33910384641-10144.07487539981.28141876324862
31179612173565.0564279699945.517467280116046.943572030991.06932807845214
32194690180441.1106014478007.8889777444414248.8893985527-0.423482449628982
33189917192908.87017805710826.1682745061-2991.870178056690.615834290484045
34184128193152.7871789584139.82790479826-9024.78717895844-1.4610425271138
35175335183848.063250091-4346.81546376042-8513.06325009148-1.8549775553989
36179566178532.47911442-4958.136259178231033.52088558004-0.133827154475653
37181140175326.010993345-3851.469584450695813.9890066550.242335437357563
38177876174282.939667669-2081.891376369333593.060332331180.386087158039522
39175041173158.81745396-1482.011977116581882.182546040270.1309829340609
40169292168994.249367709-3163.13862924079297.750632291293-0.368567267034374
41166070169646.309863289-763.205362090949-3576.309863289440.525195350873923
42166972177455.6353367914626.29242174081-10483.63533679131.1758814474454
43206348196321.83275686813563.311199575310026.16724313221.9507526772774
44215706205815.79714477111008.79140765989890.20285522912-0.558145810918597
45202108204973.2245692273563.38744004507-2865.22456922663-1.62699829422687
46195411201522.098004694-843.370307251786-6111.09800469404-0.963006175797857
47193111200969.451858168-660.808414645414-7858.45185816790.0399127134042939
48195198196254.892861228-3207.11727861893-1056.89286122749-0.557147412377684
49198770193307.199120087-3044.071650192695462.800879912940.0356549306062865
50194163190009.950928879-3202.865114397324153.04907112133-0.0346575473208743
51190420186574.038746007-3348.533557124623845.96125399319-0.0318157697883962
52189733188530.143697537-32.19890982192151202.856302462520.726095908233123
53186029192484.2612884982466.05880408533-6455.261288498410.546665559077637
54191531204715.9236936198587.51207231675-13184.92369361931.33669696185798
55232571219814.57473923612663.589453525812756.42526076410.889770826905143
56243477230541.28257136211451.580886204812935.7174286375-0.264751257599742
57227247231372.5343488394803.80587214477-4125.53434883918-1.45268604603741
58217859226696.479189295-1130.72628629846-8837.47918929496-1.29707740133963
59208679217491.164773179-6185.61047580729-8812.16477317872-1.10525909344435
60213188213154.618540323-5027.4994938490433.38145967655290.253298113116776
61216234209660.257915201-4067.087559738796573.74208479910.209901025183713
62213586207871.546543988-2642.164780880545714.453456012040.311068995341031
63209465206322.216372048-1960.203245851893142.783627951540.148972379749681
64204045204244.079825336-2033.80372268019-199.079825335904-0.0161041908561374
65200237208692.7910568412018.74919258869-8455.791056840620.886612053302789
66203666218109.2149732326645.52525770887-14443.21497323181.0107774704751
67241476227988.1974873468665.917775974613487.80251265380.441108452115652
68260307242223.3278283812143.209048819118083.67217161970.75947603736066
69243324246698.1135702747355.56522068407-3374.11357027425-1.04617633912792
70244460250995.4584275835445.9307169345-6535.45842758265-0.417433774206057
71233575246239.323251358-926.478998484938-12664.3232513583-1.3934104185426
72237217239149.887039858-4777.95752681423-1932.88703985847-0.842153462146967
73235243230231.115284359-7365.61612180265011.88471564104-0.565387368669809
74230354223773.131548917-6799.189370078126580.868451083420.123673309821742
75227184221902.5534594-3728.196205073535281.446540599640.67090851790023
76221678222647.455542856-940.852685005029-969.4555428561610.609678165246867
77217142226712.0454098242182.18697207932-9570.04540982410.683142241913136
78219452234245.6318346875522.80404512864-14793.63183468720.729973073126241
79256446244198.3829054968286.2467716467912247.61709450410.603434303596034
80265845247683.0442912065293.5591389970918161.955708794-0.653597280914804
81248624251443.9184950414338.59004187538-2819.91849504131-0.208669902573859
82241114247003.50596222-1132.19171887157-5889.50596221952-1.19597039490213
83229245240671.185581779-4374.2572642998-11426.1855817794-0.708927423230605
84231805232790.233444466-6561.62730477453-985.23344446614-0.478202105051098
85219277217001.238053042-12316.47956857732275.76194695786-1.25723942192888
86219313211332.401361158-8175.313596171547980.59863884160.904277844607874
87212610207592.106521496-5415.78364948955017.893478504410.6028958998763
88214771213895.7924450881876.65756904108875.2075549117871.59475873324332
89211142221701.7921155775569.90235359118-10559.79211557690.807762121233438
90211457228055.5333484066058.38528692768-16598.53334840550.106753132723758
91240048228586.1150951262615.3683743487411461.8849048736-0.751923287785187
92240636224241.991711658-1715.5511355527316394.0082883419-0.94585801839996
93230580228503.6026456752002.35012756662076.397354325350.812379260512101
94208795217569.61560968-6045.42313017666-8774.6156096797-1.75937952165
95197922207649.778936472-8457.01668199455-9727.7789364724-0.527323488365865
96194596193514.743192979-11992.90662789131081.25680702127-0.772931457783252
97194581190700.9814774-6277.966086515773880.018522599691.24845184974666
98185686180975.753770086-8422.072828382524710.24622991417-0.468232156966252
99178106176067.821937746-6238.440495757152038.178062254130.477090650021946
100172608173358.960267088-4045.08970247495-750.9602670880280.479592287988124
101167302176270.880631625281.715934089592-8968.880631625440.946225918545667
102168053181558.4460412183396.51305971685-13505.44604121830.680744459035626
103202300188485.1813776955592.1791048008413814.81862230530.479558815181079
104202388189609.3359681742815.6009682742412778.6640318256-0.606407110459082
105182516179640.539382397-5124.92399548412875.46061760332-1.73501835998772
106173476178472.492736846-2666.96699474259-4996.492736846090.537349176778076
107166444175073.706988861-3121.81386843981-8629.70698886114-0.0994543327109596
108171297172616.63623776-2708.47672000346-1319.636237760080.0903475069198403
109169701165572.225997232-5403.931171059854128.77400276786-0.588823504274659
110164182159989.330848364-5515.086078754514192.66915163592-0.0242757331098949
111161914159467.150531239-2416.421552893762446.84946876080.677025853150317
112159612161849.620450504562.002072245077-2237.620450504280.651191586698644
113151001162577.510301611665.03229837288-11576.5103016110.0225295011911768
114158114170752.5252982655331.40353863347-12638.52529826451.01986279136083
115186530172289.9999062012974.8581915160214240.0000937991-0.514733727123633
116187069171047.166595641357.17831665832516021.833404359-0.57172253610119
117174330172414.858023977984.0139148704251915.141976022650.136963602528149
118169362174157.5312553821454.66861716228-4795.531255381860.102890363007201
119166827175436.6660299521345.71317346924-8609.6660299519-0.0238225566413786
120178037177220.3920396211617.70035319194816.6079603791570.0594482735521231
121186413181263.850596893123.641983865085149.14940310990.328975381755206
122189226186247.5995814284277.507466045512978.400418571670.252013409270007
123191563190663.0075253194362.9928549446899.9924746806520.0186779429061571
124188906192503.5861021792799.24853034303-3597.58610217918-0.341865717159265
125186005198957.5974042945066.35276190169-12952.59740429350.495704946314452
126195309206045.9037023816321.09883679113-10736.90370238130.2742322078
127223532208955.4535224334204.6504955092414576.5464775672-0.462315945778104
128226899211486.8401126953167.348672764215412.1598873053-0.226563993733158
129214126212847.0340645292047.618013730241278.96593547067-0.244660431046521
130206903212242.432296491404.140320608268-5339.43229649135-0.359270529900228
131204442212971.385883873605.515379350774-8529.385883872980.0440274656527811
132220375218859.1592964683881.559261488451515.840703531970.7160200069091
133214320213142.374199007-2069.998795542721177.62580099314-1.30014808627327
134212588209318.243279716-3156.902364256733269.75672028422-0.237400412746034
135205816204675.46019026-4077.05655910831140.53980974018-0.201049278471186
136202196205740.555967152-892.543157578177-3544.555967151570.696155261017313
137195722208600.879766041432.81898590145-12878.879766040.508406725112828
138198563208756.477935827641.140900804033-10193.4779358265-0.173024379233279
139229139212778.7457805732736.386589210216360.25421942710.457705202669824
140229527214030.1944413451816.7906010676815496.8055586554-0.200863272843891
141211868211152.295565246-1089.15354683169715.704434754372-0.634946893014263
142203555209576.776327862-1390.22722328913-6021.77632786163-0.0658133655147167
143195770206506.565458405-2430.66056556302-10736.5654584045-0.227462610859021
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/1gowx1293459690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/1gowx1293459690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/2gowx1293459690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/2gowx1293459690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/3rxvi1293459690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/3rxvi1293459690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/42oc31293459690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/42oc31293459690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/52oc31293459690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293459639utm05iga9ejoh6w/52oc31293459690.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