Home » date » 2010 » Dec » 28 »

Paper: analyse (min 18) 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:22:02 +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/t1293564003qqgm9a5wu4u6pew.htm/, Retrieved Tue, 28 Dec 2010 20:20: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/t1293564003qqgm9a5wu4u6pew.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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
14991549915000
24746948054.9102584259-1908.51207570129-585.910258425918-0.625488600724794
34565245445.8356412282-2397.35536871778206.164358771802-0.149024366962252
44349243332.3434749779-2187.19975647116159.6565250221010.0621313834064608
54108741106.6751007528-2215.08493897911-19.6751007527871-0.00795648533898918
64293142052.439594292864.9362536785892878.560405707210.65680299294174
76725662050.983969099914488.87152981315205.016030900074.15121258854616
87231674531.934715514713035.1133053156-2215.93471551473-0.418188136631675
96562470219.9507997024477.10632617661-4595.95079970239-3.61273968604251
105945060738.6466338554-6730.69668451185-1288.64663385539-2.07352969680377
115285152451.8762318613-7856.89447658363399.123768138654-0.323981888124756
125121449691.5549776427-4168.214520065421522.445022357281.06115163246103
134409244728.4748478281-4742.05998035167-636.474847828119-0.165575580733713
144375243191.9849351941-2419.20916876936560.0150648058850.678694001099109
154032040188.5198269027-2827.23959030123131.480173097352-0.116793903281184
164055138604.222274751-1960.674520234941946.777725248980.253193330939974
173832938299.0407172673-799.62212651428429.95928273266810.333835783979233
183953043672.16302633543495.66126032296-4142.163026335381.23296670253431
195964853673.29170220488021.824396518835974.708297795171.30306317905240
206103159842.36962268836730.772612042231188.63037731172-0.371467468909485
215556059281.74483831191648.19613009143-3721.74483831189-1.46205080255301
224387747941.0967737009-7405.47656194947-4064.09677370087-2.60471367136971
233851039063.8369982592-8430.9988421114-553.836998259239-0.295022567138393
243608533352.9072516004-6537.606297349892732.092748399630.54485842900725
253599435089.7448842835-777.408143156459904.2551157165061.66203973610960
263261732448.5817439652-2076.48232482017168.418256034769-0.374255606161042
273000129617.9250730681-2596.69665383055383.074926931942-0.149313923462349
282789426136.2778234155-3205.523122965111757.72217658450-0.176113986265837
292608326954.1109883542-423.976910562849-871.1109883542150.801730521601201
302881733937.79964261264682.1417449956-5120.79964261261.46613494810727
314874242505.88117738277355.449423821846236.118822617340.768965156121511
324991547606.18982985075802.456888257472308.81017014934-0.446898132348216
334026442698.495161203-1578.17968080328-2434.495161203-2.12317677200541
343427637913.0167580412-3788.43965364417-3637.01675804118-0.635865626585045
353042632318.9483593869-5032.14034101896-1892.94835938688-0.357789999243963
363079329861.0325490950-3260.16378515952931.9674509049580.510085292336623
372985527944.6865193557-2334.476006849301910.313480644270.266779165340143
382808126763.0827706027-1540.587764417051317.917229397320.228354119483739
392682025427.3438382166-1400.233114179291392.656161783370.040331658354731
402578224835.0568374816-847.448526610465946.9431625183610.159424443417562
412265425819.3665913805409.441124164234-3165.366591380520.362209378686596
422737332765.19645030754891.25038678277-5392.196450307521.28804971836422
434367537433.72511998974738.809272159716241.27488001034-0.0438297992020393
444509640069.83771024883299.286183225645026.16228975124-0.414172042334057
453814540244.80728155011158.92410154342-2099.80728155011-0.615752566302866
463401737902.810464905-1239.66534497966-3885.810464905-0.690023147959359
473153734644.3636038226-2622.29099215778-3107.36360382258-0.397788341007762
483381432934.157719665-1997.71760061051879.8422803349910.179793654454959
493653133968.267727452879.6621554371922562.732272547180.59818552619235
503693535099.4261595517799.6339607296481835.573840448260.207038055815206
513649735141.9142912602282.7378229703641355.08570873980-0.148605061734198
523511034899.7905536118-75.2888927711292210.209446388207-0.103140833765052
533313737795.49402260971954.96653353691-4658.49402260970.584835304048984
543740742466.88719952063811.37251798781-5059.88719952060.533829878715382
555396347190.50112745254434.012297939856772.498872547460.179012405974210
565660250896.43639195453937.19269597665705.56360804546-0.142913874456852
574969451468.27669907471639.83236233210-1774.27669907469-0.660927905622397
584395748267.7475260176-1664.87946479897-4310.74752601763-0.9507332654719
594172345313.1326125358-2545.29762762862-3590.13261253583-0.253325304533689
604559945066.0274832496-976.293511926042532.9725167503670.451620096662118
614250341079.2148478209-3032.421230623371423.78515217905-0.591784028094205
624215339241.9736353241-2216.740950243412911.026364675900.234553570577528
633909837323.8789318702-2013.316664919041774.121068129780.0584972040110666
643744937534.0867613161-499.512551163299-85.08676131605170.435879781063916
653474839775.05428769081368.48657138000-5027.054287690840.537931746119703
663654842079.2701009752006.50738575646-5531.2701009750.183526261792228
675363946329.90107934793535.346532247057309.098920652140.439587847351093
685528948919.24291023192891.171597489456369.75708976808-0.185278320732578
694777448789.9459489652834.151382728867-1015.94594896516-0.591773463809047
704215646880.6418009678-1034.44223846550-4724.64180096778-0.53761277971524
713801942992.6019574356-2978.10248868457-4973.60195743558-0.559299989947147
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564003qqgm9a5wu4u6pew/1775b1293564117.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564003qqgm9a5wu4u6pew/1775b1293564117.ps (open in new window)


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


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


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


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