Home » date » 2009 » Dec » 11 »

Structurele tijdreeksanalyse

*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, 11 Dec 2009 09:03:21 -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/11/t126054746818e0rf5ajsih91c.htm/, Retrieved Fri, 11 Dec 2009 17:04:35 +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/11/t126054746818e0rf5ajsih91c.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 «
8.3 8.2 8 7.9 7.6 7.6 8.3 8.4 8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9
 
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'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
18.38.3000
28.28.20150794324155-0.0986166801562142-0.00150794324155027-0.309040537073739
388.00283057750846-0.194512078765493-0.00283057750846062-0.304377034984027
47.97.89619813771343-0.1109922219244770.003801862286571220.259490908910541
57.67.60710290313238-0.280349045317253-0.00710290313238139-0.526922252594266
67.67.5894352782938-0.03051547187117830.01056472170620590.777236677085165
78.38.277563500338230.6529629345688760.02243649966176692.12631693214153
88.48.424114650872860.171335733221709-0.0241146508728594-1.49835286505826
98.48.4022979407693-0.0123638970675732-0.00229794076929965-0.571493612201239
108.48.398118670039-0.004579819594935950.001881329961004930.0242164371391531
118.48.399979649598710.001545771431250552.03504012858244e-050.0190568491318921
128.68.59353025279410.1841540191876590.006469747205907530.568098296613493
138.98.897237211188910.2978197216615050.002762788811087510.353780641744862
148.88.81254857887911-0.0661567648095394-0.0125485788791144-1.13787364407034
158.38.33210551744682-0.449554428603814-0.03210551744682-1.20575176823243
167.57.49654751038298-0.8068027690146520.00345248961702379-1.10993647895224
177.27.16825468178275-0.3643792685715750.03174531821724761.37659020782180
187.47.411106370729320.197272316466894-0.01110637072932081.74730949268202
198.88.707786854756341.214171158303650.09221314524366543.16359846568683
209.39.358289572978840.692818917212127-0.0582895729788386-1.62193836112218
219.39.33724579139320.0325503854806996-0.0372457913932058-2.05411002973329
228.78.71867517045162-0.569688907524338-0.0186751704516244-1.87357979531947
238.28.1937878995701-0.5282501754803310.006212100429894750.128916898298164
248.38.275650128164730.03604488635970180.02434987183527051.75553885567322
258.58.486810746204860.1979604095138430.01318925379514030.504014491173652
268.68.606593221340470.125609684135195-0.00659322134047034-0.225515294382770
278.58.50279066740803-0.0836346857588167-0.00279066740803013-0.654241362504792
288.28.21530980336555-0.269995115243943-0.0153098033655529-0.579478181871975
298.18.06084726067879-0.1645435401714580.03915273932121410.328054018511747
307.98.00679015783698-0.0636579506010582-0.1067901578369760.313866338946917
318.68.464588886211650.4125164875166750.1354111137883501.48138602867508
328.78.744667650724230.291582226359057-0.0446676507242307-0.376229419108265
338.78.70697815706679-0.00908476219982657-0.00697815706678867-0.935381666329714
348.58.50706404644173-0.183337772839505-0.00706404644173238-0.542105007729224
358.48.42349551328738-0.0922336519816608-0.02349551328738160.283427940059473
368.58.482545288530280.04589768743891690.0174547114697240.429732441604963
378.78.682090576285630.186159733477110.01790942371436970.436660402369008
388.78.706676338129320.038598811591521-0.00667633812932111-0.459289685022563
398.68.59138376215762-0.1008622988516710.0086162378423773-0.434927081496445
408.58.51385208004961-0.0796716143642026-0.01385208004961180.0659285991504954
418.38.25890553924152-0.2386379134148010.0410944607584801-0.494452744334046
4288.14993461344097-0.121006421414725-0.1499346134409690.365974353648347
438.28.06582710542257-0.08752855448510580.1341728945774310.104149836040597
448.18.116175409899930.0375638170478271-0.01617540989992750.389165448216263
458.18.09088508707781-0.01946124567316150.00911491292219052-0.177406231052720
4688.01186461406146-0.0734975032603589-0.0118646140614547-0.168108093818893
477.97.93121085797819-0.0799901770160099-0.0312108579781895-0.0201989406438855
487.97.89963440230783-0.03607189853782370.0003655976921668850.136634123441552
4987.96676472579530.05754415660344150.03323527420469410.291437152539457
5087.996012962318870.03187779674301050.00398703768113005-0.0798466092202058
517.97.90736032468487-0.0769665872681344-0.00736032468486671-0.339061405531233
5287.983135960919080.06120941543164950.01686403908092080.430003205562517
537.77.68911191307443-0.2598014482566190.0108880869255737-0.998402009993685
547.27.352599876354-0.329126626078210-0.152599876353997-0.215684513089949
557.57.36012550557213-0.02483946188275520.1398744944278660.946641438144736
567.37.3141494166909-0.0439441485933053-0.0141494166908954-0.059435064635252
5777.00270763400846-0.285723114504312-0.00270763400845993-0.752179878351502
5876.9915471819148-0.03755679289086240.008452818085192240.772052556840845
5977.026932709808180.0283719342405384-0.02693270980817530.205106003491748
607.27.202391377522130.161294440603718-0.002391377522129990.4135480595682
617.37.27288683197940.07923186691649840.0271131680205903-0.2554448349319
627.17.09985318516729-0.1486861333618200.000146814832710113-0.70892621824615
636.86.84291559765728-0.24621877452675-0.0429155976572829-0.303662639828411
646.46.36032599414731-0.4594655317249170.0396740058526884-0.663676077715483
656.16.05897452667951-0.3169226189164310.04102547332049240.44332999844042
666.56.635227080602320.488227690252844-0.1352270806023172.50494243221914
677.77.540674076570170.8643920926352540.1593259234298281.17026054465987
687.97.910565741672310.418541277665396-0.0105657416723083-1.38704799283956
697.57.5732063271842-0.262988181540286-0.073206327184208-2.12025519382940
706.96.91661774716365-0.617863481089187-0.0166177471636463-1.10402931056326
716.66.62313661158964-0.325406663450460-0.02313661158963570.909837401592211
726.96.867074242605150.1878229737691780.03292575739485421.59680928356641
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/100s21260547397.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/100s21260547397.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/2crip1260547397.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/2crip1260547397.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/3vwg01260547397.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/3vwg01260547397.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/4km8j1260547397.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/4km8j1260547397.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/50esj1260547397.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t126054746818e0rf5ajsih91c/50esj1260547397.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