Home » date » 2009 » Dec » 01 »

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: Tue, 01 Dec 2009 12:54:37 -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/01/t125969733043fhia1j8lhq69j.htm/, Retrieved Tue, 01 Dec 2009 20:55:37 +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/01/t125969733043fhia1j8lhq69j.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.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 7.7 8 8 7.7 7.3 7.4 8.1 8.3 8.2
 
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
18.48.4000
28.48.4000
38.48.4000
48.68.594502881849090.1863364984712070.005497118150910830.542139808952547
58.98.898187574877190.2988208786663450.001812425122812850.327604743032395
68.88.81218879419231-0.0701036903600278-0.0121887941923082-1.0744078602474
78.38.30982820712854-0.484497368791315-0.00982820712853705-1.20682693844648
87.57.50619437027392-0.790443779007934-0.00619437027391512-0.890998953192124
97.27.1841981799698-0.3413566543726830.01580182003020041.30786355065082
107.47.387839918495450.1811176244537330.01216008150455001.52158685435875
118.88.769403133279731.331950181557210.03059686672027313.35153664288356
129.39.331417968581670.593835381079452-0.0314179685816659-2.14959055962222
139.39.312060246205030.00614229913265951-0.0120602462050237-1.71219001997661
148.78.71417121390012-0.573184008276645-0.0141712139001166-1.69423863951449
158.28.19291377757677-0.5245900122182040.007086222423232570.142937770280577
168.38.278706518584610.04608477580661030.02129348141539211.66000271945657
178.58.490826570389340.2012334139530790.009173429610654370.451892590507891
188.68.610260113055910.124775165732414-0.0102601130559145-0.222666517111757
198.58.49906162872325-0.09578937517306620.0009383712767499-0.642344401582395
208.28.22059950369853-0.266530263226196-0.0205995036985341-0.497243774358148
218.18.0671242661379-0.1608599020449250.03287573386209840.307740764488693
227.97.9519178929486-0.118188339236399-0.05191789294860330.124271169664202
238.68.519740959738710.5230203674974460.0802590402612891.86737445325227
248.78.74242533811970.242306274407083-0.0424253381196999-0.8175171896451
258.78.69797842724487-0.02564172060564530.00202157275512926-0.780709100960954
268.58.50132251246483-0.185569562503805-0.00132251246482670-0.466614956822868
278.48.41811469353935-0.0911547063213842-0.01811469353934720.276352870301122
288.58.48365115932580.05359920368471950.01634884067419420.421298118657457
298.78.687386178159330.1921288006513340.01261382184067340.403448763895573
308.78.711843948787780.0373675017945224-0.0118439487877778-0.450712780267858
318.68.59304152670997-0.1067835638814930.00695847329002688-0.419806817830184
328.58.52145780871233-0.0742934064926835-0.02145780871233120.0946201826656657
338.38.25530817586004-0.2513788777267350.0446918241399638-0.515720954263528
3488.09985758883582-0.162835388833424-0.09985758883582170.257862671210054
358.28.10177341255155-0.01076520224174150.09822658744845160.442870737944124
368.18.129558093753150.0248150432402895-0.02955809375314510.103619748756330
378.18.08810141986608-0.03633945337132690.0118985801339163-0.178202264373939
3888.00409711361563-0.0803437981701123-0.00409711361562836-0.128225093271845
397.97.9241028133476-0.080023604231224-0.02410281334760760.000934916941762015
407.97.89861201034747-0.02996892477011550.001387989652525510.145753330538329
4187.973794758511150.06642683458414620.02620524148884800.280701723197123
4288.002770873011010.0320854763466518-0.00277087301101287-0.100014939197683
437.97.91018055910298-0.0822476986425896-0.0101805591029809-0.332968048500968
4487.993013015216620.06913587958990480.006986984783376030.440870367703134
457.77.67726132357204-0.2838129574916610.0227386764279626-1.02788278615441
467.27.3141959239161-0.356489541200404-0.114195923916094-0.211653986485931
477.57.382784120374870.03332074690735760.1172158796251261.13523790722274
487.37.33239981069436-0.0434311786450603-0.032399810694358-0.223525681529458
4977.00145157623927-0.307046239928848-0.00145157623927222-0.768172856093289
5076.98466972743133-0.04090070300360840.01533027256867400.77512340161062
5177.020539724264480.0291743944877572-0.02053972426447950.204371834297510
527.27.201629426630880.168063168540456-0.001629426630883530.404538839841147
537.37.278294178038540.08458778039075320.0217058219614643-0.243056860738686
547.17.10447766873797-0.151449040374118-0.00447766873797478-0.687434972770834
556.86.84491095858611-0.250218854362103-0.044910958586107-0.287643356539499
566.46.37048585356149-0.4550395149456620.0295141464385114-0.596493447011743
576.16.04662841713655-0.3352013672063790.05337158286344610.349001215668825
586.56.606301588231620.482295506431774-0.1063015882316192.38077547677439
597.77.561005900963380.9138541150889240.1389940990366241.25681899661878
607.97.931980330918780.417984603653717-0.0319803309187814-1.44415926819459
617.57.56674274440778-0.297445557429344-0.06674274440778-2.08462594732407
626.96.90371487086696-0.631307123974338-0.00371487086695706-0.972161148286413
636.66.61464816362608-0.319647774563612-0.01464816362608010.908425293627625
646.96.868996013287740.2037193049208180.03100398671226091.52458534731289
657.77.635114487737150.7161262300786770.06488551226285171.49193598767762
6688.02666095087850.420394582704619-0.0266609508785065-0.861286443508214
6788.037308867851950.0470167974500614-0.0373088678519463-1.08737666402777
687.77.66381937553885-0.3361689853065710.0361806244611525-1.11593967357225
697.37.30718183205484-0.354820772858166-0.00718183205484464-0.0543190866513019
707.47.539106789830840.17984804454146-0.1391067898308351.55710462546365
718.17.935712053004360.3773627611220930.1642879469956360.575216160067762
728.38.280997119486550.3481367688556240.0190028805134527-0.0851193254992055
738.28.24143453405873-0.00513654574708017-0.0414345340587352-1.02927863813055
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/146uw1259697275.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/146uw1259697275.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/24tpx1259697275.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/24tpx1259697275.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/344i21259697275.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/344i21259697275.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/4erhh1259697275.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/4erhh1259697275.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/5k4v41259697275.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t125969733043fhia1j8lhq69j/5k4v41259697275.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