Home » date » 2010 » Dec » 21 »

structural Time series analysis - Goudkoers

*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, 21 Dec 2010 20:38:33 +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/21/t12929637857xh9x9qyvoeikax.htm/, Retrieved Tue, 21 Dec 2010 21:36:32 +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/21/t12929637857xh9x9qyvoeikax.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 «
10570 10297 10635 10872 10296 10383 10431 10574 10653 10805 10872 10625 10407 10463 10556 10646 10702 11353 11346 11451 11964 12574 13031 13812 14544 14931 14886 16005 17064 15168 16050 15839 15137 14954 15648 15305 15579 16348 15928 16171 15937 15713 15594 15683 16438 17032 17696 17745 19394 20148 20108 18584 18441 18391 19178 18079 18483 19644 19195 19650 20830 23595 22937 21814 21928 21777 21383 21467 22052 22680 24320 24977 25204
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
11057010570000
21029710311.4309338616-14.3300168867088-14.4309338616498-0.227169279244938
31063510645.4340167542-11.5503640960789-10.43401675416000.50969214536157
41087210882.9297069481-9.2485891206808-10.92970694810050.364039375874384
51029610313.5339426804-15.4524785552112-17.5339426803725-0.818027307141764
61038310394.8579236197-14.2153091466331-11.85792361973530.141200919554811
71043110444.0648802964-13.2992334631293-13.06488029639410.0924525028809954
81057410585.9057150308-10.8085959503998-11.90571503077830.225953065707245
91065310665.1256981962-9.22316568886463-12.12569819616620.131009033519912
101080510816.0338840354-6.163100360503-11.03388403539380.232827326833022
111087210883.4040078868-4.65198392042856-11.40400788680240.106828923057185
121062510638.8389634111-9.91323577423113-13.8389634111157-0.348271837000529
131040710383.9444843815-5.9631434738333323.0555156185204-0.426990202390501
141046310464.5467515216-2.36986939545989-1.546751521565810.106999428836634
151055610554.9953835900-0.072048875259331.004616410022210.134326064001681
161064610640.94815935652.110630895898685.051840643549020.124391474525599
171070210705.36639344123.76786453069574-3.366393441248390.0900414212268233
181135311343.397307376221.32496664450429.602692623799250.916030841199593
191134611347.814253130320.8397106088232-1.81425313026019-0.024405364334406
201145111448.192004034923.19880877491072.807995965145950.114744600080064
211196411957.533491019538.05687071781046.466508980492860.700968772022597
221257412566.953509453056.0043546394657.046490546962380.823450370086635
231303113024.375531909368.94260342355426.624468090656760.578282842290358
241381213802.364482884592.21532030840259.635517115495191.02080642946155
251454414461.0568846203104.00092394796982.9431153797040.893221118276242
261493114933.0239420776119.560091975791-2.023942077648740.48365443433101
271488614892.2272791964113.930974313189-6.22727919639597-0.230615695272288
281600515983.7698087912148.32056130291621.23019120875671.40503050421761
291706417065.8742390782181.728681083697-1.874239078173801.34170138404619
301516815199.0330663883107.400774340224-31.0330663883255-2.94264870076677
311605016031.8443997713134.05640944167018.15560022867141.04172979031148
321583915851.3175930065122.361800688473-12.3175930064887-0.451646175900321
331513715151.317298884291.4634489481066-14.3172988841658-1.18038819083854
341495414954.324214010380.51865767997-0.324214010258316-0.413951768417101
351564815641.1614438442103.7474232613706.838556155805070.869986214746308
361530515316.565274558987.281418367961-11.5652745589256-0.614268355669947
371557915532.78059147391.611017081251246.21940852699580.196265736264609
381634816328.1311469939121.77757098242519.86885300606360.949776244589926
391592815954.4988768729102.123000806226-26.4988768729438-0.710424099532503
401617116164.8033425708106.4002090239956.196657429203840.155042051538028
411593715906.829101336491.902039174062630.1708986636254-0.522184443462542
421571315755.077747261182.1573459744097-42.0777472610955-0.349143939918781
431559415574.184351191271.589049121550119.8156488087597-0.376898463657610
441568315676.392492504872.82432430523536.607507495237350.0438665386065906
451643816425.9249525618100.22926099031212.07504743822330.969397465199311
461703217032.4770064146120.807157673750-0.4770064146292170.725261131089244
471769617668.3593634435141.81891065486527.64063655646530.73780275508995
481774517757.4228852631139.668970186307-12.4228852630807-0.0755240816961078
491939419274.8688851192192.860438113673119.1311148807802.06047619153955
502014820115.825097015220.62397475477532.17490298499730.887884438663069
512010820157.2353552000213.205110021669-49.235355199975-0.256678521933197
521858418621.1449944282141.066501733468-37.1449944282249-2.50403529013489
531844118410.7790711907126.53932693743830.2209288093089-0.50307585419112
541839118433.8517844117122.254054256802-42.8517844117177-0.148110090241096
551917819146.8309120854146.75996799034431.16908791461020.845574925628327
561807918122.957079999798.1246066901327-43.957079999665-1.67560153872566
571848318471.6869124512108.55052330993011.31308754879230.35869412614005
581964419637.9152741721152.6111757020816.084725827854041.51384177085314
591919519188.5675517928127.4981383370566.43244820716244-0.861627992384058
601965019679.5089195119142.632334524159-29.50891951193310.519914012929075
612083020692.3644997046178.003795999333137.6355002954411.28769784418317
622359523511.8785745799290.65079585343583.12142542009163.65402350043202
632293722978.6376106425256.055656643196-41.6376106425308-1.17932711058717
642181421866.0010399569198.750238369558-52.0010399568686-1.95822450308203
652192821876.5489588988190.86365568668651.4510411011698-0.269277849997684
662177721835.8791519986181.153951520203-58.8791519985783-0.331283718039010
672138321328.7075398016152.27095946454554.2924601983522-0.984860485440262
682146721495.0157323517152.860291318174-28.01573235165050.0200842474512446
692205222048.9095535015169.7053294772113.090446498504170.573784967583753
702268022638.2738545643187.34170894831441.72614543574850.600441647326592
712432024266.3283297039247.92310241715753.6716702961342.06149034020675
722497725011.1175690590268.781202872275-34.11756905896370.710549527544314
732520425292.4391434107269.301659881545-88.43914341069360.0184252213719177
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/1ez0e1292963909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/1ez0e1292963909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/27q0h1292963909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/27q0h1292963909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/37q0h1292963909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/37q0h1292963909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/40hhk1292963909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/40hhk1292963909.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/50hhk1292963909.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929637857xh9x9qyvoeikax/50hhk1292963909.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