Home » date » 2010 » Dec » 28 »

Paper: analyse (18t/m24) STSM

*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 19:26:09 +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/t12935642411vwsqeqgt1136sm.htm/, Retrieved Tue, 28 Dec 2010 20:24:07 +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/t12935642411vwsqeqgt1136sm.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 «
49915 47469 45652 43492 41087 42931 67256 72316 65624 59450 52851 51214 44092 43752 40320 40551 38329 39530 59648 61031 55560 43877 38510 36085 35994 32617 30001 27894 26083 28817 48742 49915 40264 34276 30426 30793 29855 28081 26820 25782 22654 27373 43675 45096 38145 34017 31537 33814 36531 36935 36497 35110 33137 37407 53963 56602 49694 43957 41723 45599 42503 42153 39098 37449 34748 36548 53639 55289 47774 42156 38019
 
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'George Udny Yule' @ 72.249.76.132


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
14991549915000
24746948054.9100273512-1908.51228848179-585.910027351172-0.625488585550989
34565245445.8356321007-2397.35531297182206.164367899272-0.149024276652523
44349243332.3435485845-2187.19966673854159.6564514154500.0621313871758061
54108741106.6751305862-2215.0849477409-19.6751305861678-0.0079565128619767
64293142052.439767165464.936513275486878.5602328345820.65680302011448
76725662050.985128138414488.87330196795205.014871861614.15121270134145
87231674531.934874442113035.1129719894-2215.93487444214-0.418188710152325
96562470219.9496262154477.104421390131-4595.94962621536-3.61273986015508
105945060738.6456728403-6730.69754420941-1288.64567284032-2.07352923660390
115285152451.876074245-7856.89420889287399.123925755013-0.323981538875216
125121449691.5554151534-4168.213765509521522.444584846651.06115169088050
134409244728.4750105224-4742.0600082226-636.47501052238-0.165575793548647
144375243191.9851680310-2419.20896499232560.0148319690470.678694016392548
154032040188.5200983374-2827.23952674978131.479901662643-0.116793934872384
164055138604.2225628837-1960.674428249401946.777437116250.253193319462149
173832938299.0404129765-799.62244040314429.95958702353520.333835640316512
183953043672.16252514073495.66130739115-4142.162525140681.23296671383039
195964853673.29229026398021.825474787445974.707709736141.30306337569509
206103159842.37045139626730.773020328151188.62954860378-0.371467632964803
215556059281.74466530091648.19521816235-3721.7446653009-1.46205106993328
224387747941.0955180597-7405.47819353161-4064.09551805966-2.60471367796243
233851039063.8362282919-8430.99906663948-553.83622829186-0.295022139652995
243608533352.9073539625-6537.605631961632732.092646037550.544858643081406
253599435089.7456208396-777.407116033018904.2543791603631.66203971211854
263261732448.582261804-2076.48225280578168.417738196016-0.374255852490388
273000129617.92542403-2596.69678035483383.074575970006-0.149313969071453
282789426136.2776898046-3205.523536969011757.72231019536-0.176114056035855
292608326954.1104165456-423.977156476301-871.1104165455960.801730506581558
302881733937.79931022244682.14216449458-5120.799310222421.46613502676548
314874242505.88167324217355.450302398926236.118326757880.768965229592107
324991547606.19073825535802.457342032712308.80926174471-0.44689822013063
334026442698.4952616616-1578.18058637246-2434.49526166159-2.12317699958105
343427637913.0160557226-3788.44063477600-3637.01605572264-0.635865599434165
353042632318.9473430505-5032.14094508802-1892.94734305054-0.357789863224785
363079329861.0322013219-3260.16339595976931.967798678060.510085538939467
372985527944.6870626057-2334.475210770881910.312937394250.26677926209369
382808126763.0836287648-1540.587247205241317.916371235180.228354021685662
392682025427.3442948253-1400.233217294751392.655705174740.0403314770097582
402578224835.0564856024-847.4490756093946.9435143976060.159424302657798
412265425819.3657289281409.440685043375-3165.365728928060.362209382122214
422737332765.19620846384891.25096588271-5392.19620846381.28804991139661
434367537433.72563512764738.809963007356241.27436487237-0.0438297637262487
444509640069.83868093003299.286617446805026.16131906995-0.414172084362699
453814540244.80765032211158.92368420508-2099.80765032213-0.61575276386306
463401737902.8099065578-1239.66626997443-3885.80990655779-0.690023240910395
473153734644.3626614841-2622.29163776583-3107.36266148412-0.397788229981384
483381432934.1573268921-1997.71738675355879.8426731079180.179793888019627
493653133968.268194151379.6629482371552562.731805848730.59818564696341
503693535099.4269041232799.6344482505831835.573095876780.207037952097699
513649735141.9145688030282.7376250654231355.08543119695-0.148605247383081
523511034899.7900591218-75.2895058861104210.209940878196-0.103140945482274
533313737795.49328820381954.96630953774-4658.493288203820.584835370851633
543740742466.88701281233811.37294234474-5059.887012812310.533830023832569
555396347190.5016686244434.012970057446772.498331375960.17901246348803
565660250896.43724594543937.193090183525705.56275405458-0.142913943442061
574969451468.27708176641639.83201388054-1774.27708176640-0.660928068411421
584395748267.747066966-1664.88036798074-4310.74706696604-0.950733351828158
594172345313.1318324563-2545.29819128717-3590.13183245635-0.253325187313365
604559945066.0271299942-976.293296516713532.9728700057650.451620286142561
614250341079.2149010603-3032.421019633581423.78509893975-0.591783983916273
624215339241.9741741646-2216.740498334992911.025825835360.234553621817085
633909837323.8791520904-2013.316724557911774.120847909640.0584970524155923
643744937534.0864154188-499.512856155734-85.08641541878980.43587967697749
653474839775.05375117421368.48646741695-5027.053751174240.53793176246557
663654842079.26989587292006.50762033808-5531.269895872920.183526344978030
675363946329.90161023823535.347208097427309.098389761760.439587940458182
685528948919.24370570342891.171950947466369.75629429663-0.185278399253649
694777448789.9463504437834.151091208721-1015.94635044374-0.591773603848368
704215646880.6414977795-1034.44293477845-4724.64149777951-0.537612854741253
713801942992.6012693490-2978.1031007798-4973.60126934904-0.559299922580377
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935642411vwsqeqgt1136sm/18dsv1293564363.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935642411vwsqeqgt1136sm/18dsv1293564363.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/28/t12935642411vwsqeqgt1136sm/4j5rg1293564363.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t12935642411vwsqeqgt1136sm/4j5rg1293564363.ps (open in new window)


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