Home » date » 2010 » Dec » 29 »

Paper Structural Decomposition

*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 23:01:27 +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/29/t1293577210ms4evp531ldj894.htm/, Retrieved Wed, 29 Dec 2010 00:00:11 +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/29/t1293577210ms4evp531ldj894.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 «
1203 1319 1328 1260 1286 1274 1389 1255 1244 1336 1214 1239 1174 1061 1116 1123 1086 1074 965 1035 1016 941 1003 998 891 828 833 887 842 793 778 699 686 727 641 619 627 593 535 536 504 487 477 435 433 393 389 377 339 370 350 341 367 396 408 405 391 396 368 356
 
Output produced by software:


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


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
112031203000
213191271.337682384616.050119749731035.457190472364032.13680144797764
313281301.55097452457.85966207519046.622853345446990.913744894947211
412601279.881714761335.566149485771585.72141857710112-1.15670593386498
512861282.703722586765.32738976339465.66448771565941-0.106850817282098
612741277.441777306294.294354161074125.50474629024856-0.405381880146181
713891337.1383248256410.22475628967936.145497358047132.08292772605223
812551293.153934769154.003314106407215.64681477531442-2.00599739860565
912441264.52003946440.06323981690729895.40232066141286-1.19232186340311
1013361301.464469489774.679565452029455.63053347174651.33400781316754
1112141251.24567703662-2.370180625624295.34761169860572-1.97077075598029
1212391240.29597316713-3.491985562542195.31061435031826-0.306261799708889
1311741235.13552694535-3.66968062081088-59.9134187155649-0.0707135415833912
1410611123.43141275073-18.50223372431682.18890309220458-3.2560081436769
1511161110.03442129365-17.81276222196572.266841203302560.175038143358962
1611231108.4224787782-15.62671076315872.385004388677410.569389273276767
1710861087.57968016565-16.33192685079682.36795896296858-0.183848843083739
1810741071.46639629124-16.30230840061262.368239824009270.00769841210980477
199651002.45965182791-23.45279496531692.35065343484883-1.85351910030537
2010351009.58023427643-19.3001508758742.347580524701371.0743638727477
2110161003.60567272486-17.48867297145442.343859660114540.468054865037274
22941959.052858598201-21.17006519725162.35290836771339-0.950378993977456
231003973.676343017156-16.29899676618412.341022537155491.25675633114193
24998979.209394297848-13.32689351923372.334357281580250.76650184259075
25891943.521224888383-16.265335219752-36.4529886950164-0.858695912553732
26828866.024541826562-24.59042548918672.12590025102563-1.95978073100647
27833835.381901686831-25.41189893631912.06964532461525-0.209382487492236
28887852.654868242657-19.60603216272322.242961829667631.49808194978023
29842836.86948644346-19.08568302643472.248626669830060.134274672713953
30793802.374060078955-21.18538699030852.24461182611986-0.541219401232844
31778778.089737729936-21.60767662323772.24549275534144-0.108779907139429
32699722.407492963085-26.25077613337252.26239817256737-1.19578181891547
33686689.07115728401-27.21621407228582.26628532802501-0.248636281396004
34727697.728796472308-22.32846460171272.247324807239481.25886289734498
35641654.493149536096-25.17697164621272.25733621084937-0.733706977773668
36619622.143570050058-26.15420403371822.26035083650177-0.251730243543539
37627623.119983715367-22.5262429013667-15.86700562551881.01440217042801
38593595.262961825551-23.25004650414791.36456441868317-0.174843971626167
39535550.049067495107-26.23227921004981.21255232197458-0.762908927134954
40536530.065888275873-25.38200895364881.231188432586670.219357698894115
41504503.592791277614-25.53063615921161.23004198861049-0.0383354495839676
42487482.456536046761-24.93179888878031.230655114131870.154317811797882
43477467.930670726792-23.51366540250351.227923169483070.365272356578948
44435438.344535275654-24.3411865556071.23044217505364-0.21311716062041
45433424.138601946363-22.96010176902991.225901337618210.355687497801202
46393395.813615949552-23.69111554274491.22819474324193-0.188280842889908
47389381.049442065686-22.47477101860041.22475388318160.313308515487044
48377368.38596794487-21.13794012447821.221443220896570.344367634763589
49339349.859686094565-20.7869245209572-12.77632630431980.0962978215120284
50370352.373755865043-17.6215780851751.435511494954410.774890669983178
51350342.651197781017-16.54836569541871.479340866329610.274969712272711
52341333.747400642999-15.50792539591541.49758012693480.268359548560303
53367345.171387116108-11.83898427876081.520115642018830.946132259232507
54396368.194997151457-7.088097464903291.52382127600861.22423361118309
55408386.982298431636-3.561769978861171.518241204645560.908332395619856
56405394.863625713048-2.002357303564841.514382716136380.401638325218341
57391390.935708334571-2.26474998001141.51508210403931-0.0675824121439657
58396391.9873260262-1.812851911379471.513934052691610.116398959607753
59368376.662805628962-3.653952273590531.51814916260386-0.474258104875292
60356362.441685267873-5.093824076811891.52103418361381-0.370924786860383
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/11zmr1293577282.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/11zmr1293577282.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/21zmr1293577282.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/21zmr1293577282.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/3tq3u1293577282.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/3tq3u1293577282.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/4tq3u1293577282.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/4tq3u1293577282.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/54i3f1293577282.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293577210ms4evp531ldj894/54i3f1293577282.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