Home » date » 2009 » Dec » 04 »

WS 9 ADC3

*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: Fri, 04 Dec 2009 09:36:20 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d.htm/, Retrieved Fri, 04 Dec 2009 17:37:15 +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/2009/Dec/04/t12599446265csguk8a9p9gf2d.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
100 96.21064363 96.31280765 107.1793443 114.9066592 92.56060184 114.9995356 107.1236185 117.7765394 107.3650971 106.2970187 114.5072908 98.0031578 103.0649206 100.2879168 104.6066685 111.1544534 104.9874617 109.9284852 111.5352466 132.4974459 100.3436426 123.0983561 114.2379493 104.569518 109.0833101 106.9843039 133.6769759 124.8537197 122.5132349 116.8013374 116.0118882 129.7575926 125.1973623 143.7912139 127.9465032 130.2962757 108.4424631 129.3675118 143.6797622 131.8844618 117.6186496 118.9560695 104.8202842 134.624315 140.401226 143.8005015 153.4317823 153.2924677 127.3149438 153.5525216 136.9276493 131.7730101 144.3391845 107.4208229 113.6249652 124.2221603 102.0618557 96.36853348 111.6838488
 
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'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
1100100000
296.2106436397.5373664216195-0.143860738292253-0.681713868392448-0.310174879296508
396.3128076596.6760509472387-0.182276624682697-0.144890115938404-0.104994466129451
4107.1793443102.1250013175250.004317750958574342.959809377688690.941466825970646
5114.9066592109.3265754640910.1561700547277442.752775198395071.24356833811129
692.56060184101.4305667520150.0252577203837679-5.66563470086604-1.40104564217902
7114.9995356107.5623503348380.1146620069867204.99959670820291.06408405220087
8107.1236185108.0075386467370.119328933509450-1.01595020090550.0576107766798939
9117.7765394113.0964560501710.1883590289892582.694645676486840.866223746173037
10107.3650971110.6739473804980.152550876628292-2.26567070631723-0.455090770842998
11106.2970187108.1132521377450.115808853761867-0.732036952416045-0.472946361965449
12114.5072908111.1184666375220.1544295968750192.234100316051720.503668723013701
1398.0031578106.4728887857630.414337131190102-6.45891247343987-0.982996154118947
14103.0649206104.7932905733140.384711891470705-1.00189560057220-0.341894201405566
15100.2879168103.2654178503620.332871414993055-2.35600891534035-0.303056727939821
16104.6066685103.1587617800150.3229879672649271.60098536129036-0.0736046776521629
17111.1544534104.5202245766550.3393723307820166.256757639579540.179007298202614
18104.9874617108.5183297577630.381587089940069-4.880952553800010.636389304796465
19109.9284852107.4839068799000.3679564841284342.96942262879167-0.246870615250935
20111.5352466110.5921027398250.392634153969483-0.073613182278020.477967006690232
21132.4974459119.8372321492120.4715863433330929.375171635515741.54419184670030
22100.3436426112.4709614525590.402403526426611-9.21849160530255-1.36727296540452
23123.0983561117.5090071418910.4382678307244933.867526612612860.808537090003388
24114.2379493114.7270622661860.4298860693308140.711360168868876-0.562282210151758
25104.569518112.5516688362310.470105710817692-6.98151023549014-0.477190049090728
26109.0833101110.9151731696240.457697890339571-1.07565709961084-0.359892618309900
27106.9843039109.9831909093140.434290852352844-2.52689959933962-0.229175799060881
28133.6769759120.8612469940740.6142374648546239.19863485313751.75790143069973
29124.8537197121.6456085775950.616593834122693.147493097715580.0292558078729798
30122.5132349124.5693375863400.641096411599984-2.890627201041750.40073672140986
31116.8013374120.8732368680020.603558851863338-2.49373761979692-0.756001444435605
32116.0118882119.7420129378500.590103457234771-3.09761354982556-0.302711668609346
33129.7575926118.8376361378100.57911077668470211.4652107637988-0.260852507739305
34125.1973623126.9181932947080.629649392723849-4.458938626820251.30918637823193
35143.7912139133.4478119650660.6586287318548288.187770168893641.02927781592778
36127.9465032131.0825788538650.656420039702151-2.02734274814574-0.528788945849175
37130.2962757133.9565473008110.645690061002581-4.483482735286400.393540209390653
38108.4424631123.3609601136570.598266384917787-10.8729771123176-1.93772917178489
39129.3675118128.6179602950390.652702167793489-0.8703365822692160.78432292370667
40143.6797622132.2142351077050.69256542937140210.43936042019090.49877130129205
41131.8844618131.3342467914440.6734833205873881.10783648963995-0.270291521121996
42117.6186496125.4676010756130.608359721831748-5.49990446070787-1.13463224923134
43118.9560695122.8342851595250.581681911463347-2.70625237973415-0.564789576711221
44104.8202842115.8812804151650.527876482405619-8.32920641147409-1.31489170196049
45134.624315120.4057211713600.5533026657641312.76785286425870.697746654075396
46140.401226133.5033943510870.6203456641616382.341432324726842.18952252820420
47143.8005015135.6313046912550.6256663543650057.621167176006590.263049380675878
48153.4317823145.5094942853970.6336161763190474.550455853678621.61736831017654
49153.2924677150.9351973545660.6298604583579610.6048278159543460.840666907504257
50127.3149438147.0165323440070.612005981142804-18.0664934715461-0.785919297864018
51153.5525216150.9578974580980.6416202062883581.422891572879780.566753374934996
52136.9276493139.3002277951950.5069274332977311.94534276917646-2.09631850488088
53131.7730101132.7419248005450.4320889421047531.53592589784868-1.21531374933431
54144.3391845139.1694828680790.487359611715283.022555797812561.03945457243554
55107.4208229125.1875954456650.374528298462071-12.5518191970416-2.51970021396263
56113.6249652123.7937137690370.362771627241023-9.52929085096324-0.308552980171308
57124.2221603120.5003140420970.3421353272138395.04593022686359-0.638265185866724
58102.0618557111.4086808276110.299890062570385-5.92800102403571-1.64646165455361
5996.36853348101.8723866124290.271006811103152-1.93685180440652-1.71630925625182
60111.6838488103.9162541186270.2733601737724357.123832903620360.309605310926179
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/1jua81259944577.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/1jua81259944577.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/20ycl1259944577.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/20ycl1259944577.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/3k5qr1259944577.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/3k5qr1259944577.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/4wvqf1259944577.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/4wvqf1259944577.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/5k84k1259944577.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599446265csguk8a9p9gf2d/5k84k1259944577.ps (open in new window)


 
Parameters (Session):
par1 = TRUE ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
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