Home » date » 2010 » Nov » 29 »

*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, 29 Nov 2010 19:38:40 +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/Nov/29/t1291059407d1pmijtbu2tldus.htm/, Retrieved Mon, 29 Nov 2010 20:36:47 +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/Nov/29/t1291059407d1pmijtbu2tldus.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 «
9700 9081 9084 9743 8587 9731 9563 9998 9437 10038 9918 9252 9737 9035 9133 9487 8700 9627 8947 9283 8829 9947 9628 9318 9605 8640 9214 9567 8547 9185 9470 9123 9278 10170 9434 9655 9429 8739 9552 9687 9019 9672 9206 9069 9788 10312 10105 9863 9656 9295 9946 9701 9049 10190 9706 9765 9893 9994 10433 10073 10112 9266 9820 10097 9115 10411 9678 10408 10153 10368 10581 10597 10680 9738 9556
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
197009700000
290819420.73826143724-4.57503397341958-334.787519603489-1.94833334163912
390849148.2321179393-22.2237094197417-61.4690304983253-1.35932643409782
497439343.34784279535-8.81409411905787396.7931526789631.35800127903027
585879095.71560122164-19.3900508950312-504.925703792404-1.70072005826550
697319271.81617651786-13.6794107595607455.8658809054161.44999185241013
795639434.35034089968-10.0342463289384125.6016347264531.31902540905375
899989698.06426815202-5.32959008439349295.1800124719982.05147092821893
994379674.89458065279-5.62085046102419-237.584715886029-0.133579165574056
10100389807.96279120464-3.34319558001558227.6316520735301.03724338622322
1199189889.11386429406-1.9375518131796927.42228045278690.631414668717427
1292529667.91369803597-5.59677101946833-412.117084956487-1.63793928486377
1397379552.08919683104-3.60384830364244186.876824343213-0.86796446389266
1490359409.59461289113-2.67899179874603-372.133903984141-1.07956785129385
1591339311.85888699227-4.16496377652654-177.353888196247-0.67263041852816
1694879154.6991129672-8.33751560952523334.592068482095-1.05060412474450
1787009193.57962658768-6.97757667942651-494.3039001225350.333396634245948
1896279253.45705313334-5.30704495076988372.4759768803360.487335939269192
1989479171.22145721854-6.84965694819369-222.962111985044-0.570806365140045
2092839097.54473044052-7.9282844438071186.562558772713-0.499507926303598
2188299105.00140503028-7.72068337088595-276.2576146389810.115271254865714
2299479330.41241252412-5.08131169335917612.6975153914661.74693468698770
2396289424.01713036317-4.23441714346645202.3342302945730.739005531424524
2493189518.23854501278-3.76445656788943-201.8877551728090.738190425668709
2596059459.6764990432-3.82879668964206146.246535934106-0.413027727127945
2686409244.04419693524-4.56210826835633-600.507662320528-1.58337128262167
2792149214.61938780211-4.81080269738311-0.216560409926335-0.181339244605956
2895679224.51118253601-4.57455968023359342.256760585470.105428869742625
2985479155.4886485682-5.80592525102668-607.47431171241-0.463530804487792
3091858982.93759019902-8.99015439781354204.723302297932-1.21609902294576
3194709195.9541349013-5.17658585074512270.4452240179851.64062702511872
3291239183.67746128691-5.27971708127399-60.5609704574843-0.0528942848586842
3392789382.2031240767-2.87382163726794-107.5684708160541.52369097697964
34101709524.10444499342-1.54094165229579643.4976443162761.08335330561814
3594349459.83617457115-1.96760262952293-24.7956415240818-0.469416342075148
3696559554.21997360096-1.4923627528290199.18023145485960.721127399788619
3794299426.43987264545-2.042007229370824.65470651173262-0.943949209605843
3887399354.03907144591-2.44798555611793-613.880376278443-0.522600930760403
3995529400.48683975417-2.02101862661404150.7185611013000.35935310438646
4096879364.4635244278-2.42525722468452323.0822973172-0.247867870689966
4190199439.23652410943-1.34166618786891-421.4709485891590.562508893296961
4296729526.30772242682-0.0434007403760955144.2715823596330.648134938879188
4392069354.36176555553-2.44614244313665-145.574980077923-1.27009877550764
4490699291.78361543161-3.19031980157339-221.800829933417-0.446996838873957
4597889527.2780010181-0.716325423929073256.7993940516021.78030332470969
46103129624.431802729870.0997096557668707685.9547918212560.731002105273374
47101059836.134640422121.50139418927993265.3718235562221.58104225512828
4898639824.45036443631.4281663446815438.7673703806751-0.0984793462368908
4996569747.2863632081.00202236663603-89.9909935668874-0.585846269053593
5092959801.812029757271.34029273272877-507.6898995470020.397289413220854
5199469816.199045036981.44415573243535129.5885069845190.0962975321299138
5297019676.99358770350.070804316682502326.2818444387936-1.03367139621804
5390499569.02885731826-1.13267721713387-518.285700753553-0.793427719629616
54101909686.25186774630.255068536707771501.83476982350.87169897914784
5597069795.081270759881.49910586267001-90.84491072536070.80323867926703
5697659964.8494480683.26747801761584-202.5970159982921.24993666724777
5798939928.379262275842.90299520624118-34.727741819565-0.295978019126401
5899949736.872303587081.39266123286321260.323497899433-1.45002304740247
59104339841.179603832382.07165022719497590.1264369001060.767925760346507
60100739924.933159087422.55379055226267146.7223250991370.609228534708351
611011210052.80742908423.2844438343052057.13286187135520.933264996691682
6292669964.622617162072.70151742228969-697.124074751948-0.679309531053419
6398209805.676379779831.5143546701226816.9607325809287-1.19659604466942
64100979863.907230440621.99248522598743232.1709386550580.418815616005065
6591159841.332519372441.76394392356767-725.933900660862-0.181313146896724
66104119901.655761164662.33360759523426508.3932939959890.432805119386746
6796789895.092123241382.24798389845139-216.947256592625-0.0659276055973027
681040810131.52545359694.36862516981357272.6490646515751.73983212739908
691015310180.00901380924.7301202823308-27.73170501800630.328389718555463
701036810200.94013384704.84774719815622166.7939295901400.120738774353953
711058110156.26949365054.52735315252525425.544193645666-0.369189195693014
721059710266.98737046255.16385994100877328.2676204111630.791469925792096
731068010388.58681284485.85328339486479289.5017995476800.866897317561849
74973810404.40260996195.9154121077354-666.5658201414970.0740447124641135
75955610104.98216424603.83257015297632-543.992788832738-2.26492225140974
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/1l0bo1291059515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/1l0bo1291059515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/2l0bo1291059515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/2l0bo1291059515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/3vrar1291059515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/3vrar1291059515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/4vrar1291059515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/4vrar1291059515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/5o0sc1291059515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291059407d1pmijtbu2tldus/5o0sc1291059515.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
bitmap(file='test1.png')
plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time')
grid()
dev.off()
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='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