Home » date » 2010 » Dec » 27 »

STSM- OPJV

*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:55:49 +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/t1293461667f56kjsazrjdrk91.htm/, Retrieved Mon, 27 Dec 2010 15:54:33 +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/t1293461667f56kjsazrjdrk91.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 «
20503 22885 26217 26583 27751 28158 27373 28367 26851 26733 26849 26733 27951 29781 32914 33488 35652 36488 35387 35676 34844 32447 31068 29010 29812 30951 32974 32936 34012 32946 31948 30599 27691 25073 23406 22248 22896 25317 26558 26471 27543 26198 24725 25005 23462 20780 19815 19761 21454 23899 24939 23580 24562 24696 23785 23812 21917 19713 19282 18788 21453 24482 27474 27264 27349 30632 29429 30084 26290 24379 23335 21346 21106 24514 28353 30805 31348 34556 33855 34787 32529 29998 29257 28155 30466 35704 39327 39351 42234 43630 43722 43121 37985 37135 34646 33026 35087 38846 42013 43908 42868 44423 44167 43636 44382 42142 43452 36912 42413 45344 44873 47510 49554 47369 45998 48140 48441 44928 40454 38661 37246 36843 36424 37594 38144 38737 34560 36080 33508 35462 33374 32110 35533 35532 37903 36763 40399 44164 44496 43110 43880 43930 44327
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
12050320503000
22288522755.7106018070123.370163497408129.2893981929710.699859938524715
32621726034.1579283185139.873415173678182.842071681451.63373762337835
42658326453.3297469248140.955390357216129.6702530752020.144607167104501
52775127592.8378934003145.007923908385158.1621065996910.516995150094647
62815828012.7450308873146.121851149791145.2549691126870.142326501383926
72737327245.1853116555142.435128542049127.814688344515-0.473046358384757
82836728204.949641262145.719762540397162.0503587379840.423157861516766
92685126739.1367350623139.269349498644111.863264937723-0.834336225113224
102673326591.2024067877138.124354517211141.797593212318-0.148692340818115
112684926709.8376606070138.046965839639139.162339393050-0.010089904209545
122673326599.4519517215137.064373828105133.548048278496-0.128617666936945
132795128571.436468485259.9095780052765-620.4364684852351.14337330218970
142978129722.960878083185.803633717848558.03912191688840.482967772768117
153291432703.313482723795.781935268125210.686517276281.49685127751953
163348833424.876703368696.85655852678463.12329663135420.323658502049087
173565235497.4550139661100.634707200520154.5449860338631.02183815990605
183648836366.9550266923102.125811395499121.0449733077460.397654829610959
193538735358.869742455799.9779743091628.1302575443211-0.574197066960397
203567635525.799699225100.107221116341150.2003007749920.0346272546975626
213484434792.515491195398.50179160479651.484508804732-0.431025256408253
223244732411.354151608993.723138294210135.6458483911326-1.28247037920867
233106830982.473567812490.662682799325485.5264321875637-0.787554106114009
242901028995.057352451187.700830022771714.9426475489099-1.07439256044340
252981230401.441116184562.7141134344012-589.4411161844840.746504185445936
263095130971.974298487170.205316935071-20.97429848706570.240177723116219
273297432727.223205592275.5087533429695246.7767944078360.870710240036243
283293632957.076043197575.6852427290943-21.07604319751640.0798059308776568
293401233880.849614291376.774915898542131.1503857087190.438498913978682
303294632873.949183734175.32152722325772.0508162658557-0.560306877728566
313194831980.534297460374.022436210909-32.5342974602714-0.500878670846998
323059930521.80235820171.971867925839377.1976417990226-0.792499623149191
332769127708.825827465568.1196297753673-17.8258274655428-1.49163924559909
342507325108.342648627064.5114528012522-35.3426486269561-1.37980218924384
352340623321.304215580261.786288488499684.6957844197656-0.95748258724467
362224822300.998672920861.3009201756477-52.9986729207916-0.559202667751186
372289623309.181623395350.1629803550437-413.1816233953430.51798579797272
382531725330.378019109270.6955946921059-13.37801910924360.959949006861964
392655826296.458766187673.4553762287909261.541233812370.46232445893743
402647126544.483303148373.6199899635388-73.48330314825340.0902549310526374
412754327354.324847711174.3459113873509188.6751522889280.380609344178547
422619826180.833044786473.014910700188917.1669552136448-0.645099132799864
432472524788.215023566571.4405806456747-63.2150235664904-0.7576944421123
442500524829.292427641271.4080738380939175.707572358779-0.0156969666233261
452346223464.2118630269.8711225389888-2.21186301998513-0.742626659876032
462078020859.218828308666.9070008704073-79.2188283086172-1.38288711381771
471981519691.204013268865.4126703769228123.795986731155-0.638543980139227
481976119810.635425628165.4065397009827-49.63542562807920.0279126256069340
492145421834.237892259849.3731001146263-380.2378922598321.05220576453542
502389923879.726076942865.034264601338819.27392305717490.988449956891296
512493924680.637433025967.2774177208915258.3625669741370.379688645586868
522358023778.148981462166.4123013216717-198.148981462133-0.501369013862195
532456224303.049919678266.7862841870427258.9500803218150.237012212854014
542469624613.972996008867.008156232016582.0270039911930.126202992748952
552378523919.421246611366.3020855319671-134.421246611260-0.393677712616824
562381223618.131475988165.9623995899724193.868524011931-0.190021317655576
572191721905.407296839564.311559996183411.5927031604687-0.919470007982382
581971319823.393109308362.1945443441787-110.393109308316-1.10958685140625
591928219142.221811766561.4294036805772139.778188233473-0.384343082343225
601878818909.736705294361.5667166729017-121.736705294328-0.151883267790543
612145321729.476703405944.9326269780021-276.4767034058591.46586028905602
622448224404.746505292661.102737604300477.25349470740021.31641378522984
632747427054.923927177168.8624717378877419.0760728229111.33501566955671
642726427505.663915626469.2099891416647-241.6639156264190.197429188578787
652734927148.223594428168.9056933134315200.776405571882-0.220546014484366
663063230331.842091439071.4109195894033300.1579085609511.61003472945438
672942929654.458265038870.7860826155018-225.45826503882-0.38706095905868
683008429814.359515594170.8604361134275269.6404844058750.0460646885019837
692629026377.436123294667.8923312675595-87.4361232946096-1.81323668675524
702437924501.238566675566.1102964731839-122.238566675452-1.00502145489244
712333523177.351664114464.8899263166423157.648335885565-0.718610948326894
722134621648.283765125265.9875661710296-302.283765125199-0.823832162446921
732110621631.634144236566.3668025003921-525.634144236459-0.043597591551458
742451424432.831471179679.91062498451281.16852882036681.3786785752787
752835327762.534548293289.4032908802373590.4654517068161.6748140909146
763080530840.105121296192.2665264387754-35.10512129610751.54485596099564
773134831333.477998052992.528452491609114.52200194709290.207338349369361
783455634063.274309244494.4507666470197492.7256907555531.36319953354693
793385534146.461713052494.4420990748682-291.46171305245-0.00582198237302933
803478734332.080187863994.5127960060396454.919812136070.0471287187945739
813252932618.201040859393.071870427789-89.201040859288-0.934772155094169
822999830161.401236864190.8560374844457-163.401236864123-1.31818285276112
832925729005.455399206789.930571574535251.544600793338-0.644523336446238
842815528448.725845745690.4603424161923-293.725845745572-0.334289661668408
853046631032.641658478581.5715901270925-566.6416584784831.30875391629959
863570435569.205102888799.7309087540312134.7948971112872.25748324518845
873932738748.5898836791108.428099446795578.41011632091.58648758574484
883935139392.0680198832108.971845260950-41.06801988322790.27660956264602
894223442204.9107775728110.65124148364729.08922242720301.39766767889326
904363043119.1033262394111.191200807608510.8966737605780.415341890078884
914372244005.1305928614111.749314893189-283.1305928614090.400500267119598
924312142683.2275447244110.696087424125437.772455275614-0.741034181559199
933798538201.5879845157107.178921280909-216.587984515707-2.37379520988693
943713537200.8425506302106.259765622665-65.8425506301935-0.572752042766713
953464634441.1276719898104.484193418634204.872328010226-1.48141021059758
963302633456.0013051418105.449911343061-430.001305141765-0.563375114540548
973508735819.081726201899.1115745314163-732.0817262018441.18058152283011
983884638735.8462935224108.735487566929110.1537064776491.43321246632269
994201341317.3399601055115.444186962764695.660039894511.27347974750002
1004390843971.0585627057118.168781341970-63.05856270569491.31217911486295
1014286843003.2999670125117.507960693440-135.299967012529-0.561331723658396
1024442343936.2078002634118.020339787275486.7921997366280.421466820385226
1034416744391.3370743132118.249903527087-224.3370743131620.174243332198469
1044363643045.383780085117.217249799191590.616219914975-0.756815172204146
1054438244447.6268821853118.174701502815-65.6268821852590.664233623735741
1064214242183.4471441669116.286882460825-41.4471441668706-1.23157477683542
1074345243058.9324800434116.673978728513393.0675199565870.39239485008743
1083691237815.5942507252121.546495817310-903.594250725169-2.77177073057033
1094241342951.8376637935110.353847472857-538.8376637935282.61513682721013
1104534445279.3497897512116.79944446462064.65021024884171.13097192548896
1114487344445.0402500042114.332114911795427.959749995831-0.489735299451414
1124751047323.8852320025117.440020164825186.1147679974691.42904946996624
1134955449627.6410045462118.771465124012-73.64100454616991.13014469096053
1144736947123.4914789805117.210238298574245.508521019485-1.35573616694278
1154599846190.7557045978116.529128278322-192.755704597789-0.542685119415649
1164814047544.8563287926117.374545080430595.1436712073920.639668755414994
1174844148337.4549004029117.867030260129103.5450995971170.349026054927942
1184492845251.6577711944115.447997543297-323.65777119444-1.65613979114611
1194045440010.5783140778113.232645691547443.421685922171-2.76835171561795
1203866139790.3261406604113.533244965375-1129.32614066040-0.172470690354044
1213724638034.2515068492116.871607858351-788.251506849173-0.972976165469219
1223684336747.9955242644113.35048209767495.0044757356366-0.717283552282061
1233642436190.8860790286111.692830764442233.113920971385-0.345192761144028
1243759437473.6455670092113.058677385300120.3544329908260.605310374247942
1253814438035.8154356364113.336212236926108.1845643635580.232154879223718
1263873738416.6934315364113.488874640349320.3065684635850.138286652012550
1273456035097.4255229384111.353799492565-537.425522938364-1.77427421036908
1283608035527.5686417065111.565988468768552.4313582934750.164773255236116
1293350833392.0457016653109.957797992629115.954298334703-1.16153382618737
1303546235320.4160969842111.261784702376141.5839030158340.940016778131333
1313337433098.5591693616110.490798317637275.440830638398-1.20573081522928
1323211033112.600884581110.575031541440-1002.60088458098-0.0498847521097657
1333553335980.5040388169106.621282143884-447.5040388168531.43269886493795
1343553235438.1440390498105.19720748664193.8559609501593-0.332316218213645
1353790337614.7667745226110.068009486729288.2332254774311.06646093578365
1363676336781.6620528752108.937025978198-18.6620528751583-0.487473696664362
1374039940113.1335025254110.974313102746285.866497474611.66580383924178
1384416443447.5089336765112.757146928704716.49106632351.66610648226296
1394449645009.4675944155113.626436218636-513.4675944154480.749039427203521
1404311042624.9319866186112.000085841274485.068013381391-1.29122833906688
1414388043800.4670042123112.74697338152179.53299578774810.549749737095814
1424393043645.1194403859112.565009668058284.880559614088-0.138586893537189
1434432744008.9852255906112.630298600359318.0147744093950.129863915151465
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461667f56kjsazrjdrk91/157b91293461742.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461667f56kjsazrjdrk91/157b91293461742.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461667f56kjsazrjdrk91/257b91293461742.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461667f56kjsazrjdrk91/257b91293461742.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461667f56kjsazrjdrk91/48prx1293461742.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461667f56kjsazrjdrk91/48prx1293461742.ps (open in new window)


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