Home » date » 2009 » Dec » 04 »

*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 12:54:02 -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/t12599565296fkpvsmdnmxloc7.htm/, Retrieved Fri, 04 Dec 2009 20:55:36 +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/t12599565296fkpvsmdnmxloc7.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 «
6802.96 7132.68 7073.29 7264.5 7105.33 7218.71 7225.72 7354.25 7745.46 8070.26 8366.33 8667.51 8854.34 9218.1 9332.9 9358.31 9248.66 9401.2 9652.04 9957.38 10110.63 10169.26 10343.78 10750.21 11337.5 11786.96 12083.04 12007.74 11745.93 11051.51 11445.9 11924.88 12247.63 12690.91 12910.7 13202.12 13654.67 13862.82 13523.93 14211.17 14510.35 14289.23 14111.82 13086.59 13351.54 13747.69 12855.61 12926.93 12121.95 11731.65 11639.51 12163.78 12029.53 11234.18 9852.13 9709.04 9332.75 7108.6 6691.49 6143.05
 
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
16802.966802.96000
27132.687115.7756324197521.540370097026316.90436758025090.44932039843554
37073.297056.524167571315.061885343305416.7658324286956-0.187157310312754
47264.57247.4659207062134.503705518122517.03407929378990.400585664535751
57105.337088.551411820428.6018696344703216.7785881795752-0.434618377625661
67218.717201.8140516039824.415700523932416.89594839601580.232785747773486
77225.727208.8403668983621.576145946260916.879633101641-0.0383911627018807
87354.257337.2873174104539.930034716475716.96268258954960.234708154437045
97745.467728.2729314206102.23836375822617.18706857939820.768187935665514
108070.268052.95653538964142.58009516783717.30346461036130.485552554967699
118366.338348.96102145352170.80036065478117.36897854648340.334330505643150
128667.518650.09569932421194.99664839156617.41430067579290.283691475180607
138854.348986.2839086275219.973027741281-131.9439086275010.359635051844466
149218.19206.1084578784219.94581668223511.9915421216060-0.000272798080751261
159332.99320.84782803717200.16300294829212.0521719628253-0.228425201984916
169358.319346.17604535292167.23635464065212.1339546470779-0.379580573024516
179248.669236.42090370243115.01637437658612.2390962975663-0.601357869219266
189401.29388.97246353382122.09764383674112.22753646618380.0814900739143552
199652.049639.84463716831146.40323307011712.19536283168590.279576471329508
209957.389945.21685584504176.41740795871812.16314415495460.345135700576902
2110110.6310098.4630465251172.04161603248212.1669534749371-0.0503076431132427
2210169.2610157.0779212804150.61825898505612.1820787195792-0.246268095762417
2310343.7810331.6005067622155.13362459354412.17949323776520.0519010639206832
2410750.2110738.0525543023202.60934661161212.15744569770010.54567039270012
2511337.511382.6139947891284.885344435431-45.11399478912371.04140885574006
2611786.9611781.2103252723305.9242303358525.749674727684380.223580283598754
2712083.0412077.2857953009304.0626223888835.7542046990833-0.0213735503522545
2812007.7412001.8441075777232.3440776080465.89589242226916-0.823691780188378
2911745.9311739.8844309555138.9425468624646.04556904451604-1.07295750145121
3011051.5111045.2597145929-18.55342960862766.25028540714393-1.80950861620265
3111445.911439.731985205159.48151469223116.168014794931440.896647080864921
3211924.8811918.7797689900138.7507510109646.100231010035020.91088637295186
3312247.6312241.5538822784173.5183220739976.0761177216430.399532138145045
3412690.9112684.8625549436224.4898961239336.047445056395160.585756541844059
3512910.712904.6521497850223.6018630583766.047850215031-0.0102053042766483
3613202.1213196.0768914709236.4157882627146.043108529085740.147259758283031
3713654.6713687.6172392769284.183214630968-32.94723927694340.585523185737997
3813862.8213861.0096038404263.5779594104681.81039615962577-0.224104445005227
3913523.9313521.9109588416149.6679408077752.01904115836383-1.30809171207160
4014211.1714209.3019416875251.2838892605311.868058312508901.16722051432893
4114510.3514508.4928513925260.336165989971.857148607470440.103997847996357
4214289.2314287.2839104520169.3511559865961.94608954802054-1.04540852861792
4314111.8214109.8219569976103.8250624837871.99804300243684-0.75294479695948
4413086.5913084.4547606289-109.5185823291842.13523937110385-2.45160251972505
4513351.5413349.4416659797-38.76192409252032.098334020345640.81311467280819
4613747.6913745.626429493143.41405991607442.063570506907710.944362420580778
4712855.6112853.4857819718-133.34397050842.12421802815459-2.03132331885016
4812926.9312924.8165432518-94.67381570064322.113456748210980.444405919288936
4912121.9512206.1650627209-211.779732513143-84.215062720917-1.41287088696063
5011731.6511726.2662482176-261.8088085655665.3837517823917-0.550929871409648
5111639.5111634.1729791624-229.7336472822775.337020837579550.368394716670721
5212163.7812158.6113803851-87.21935824256775.168619614931991.63717218769508
5312029.5312024.3528615403-96.10752138875025.17713845970975-0.102119361652775
5411234.1811228.9001394462-228.2442321182095.27986055382809-1.51830533203426
559852.139846.71266864719-446.2686275165855.41733135281309-2.50534035565272
569709.049703.65196554225-388.9816857094535.388034457755750.65831597897221
579332.759327.36296023724-386.5835912751675.387039762760940.0275585458283186
587108.67103.09615486353-733.7865218227185.50384513647265-3.99007266202074
596691.496686.00248109009-673.9519976469625.48751890990580.687628923348309
606143.056137.56772923764-650.2372587735055.482270762360930.272535980107564
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599565296fkpvsmdnmxloc7/1bf481259956440.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599565296fkpvsmdnmxloc7/1bf481259956440.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599565296fkpvsmdnmxloc7/22kyn1259956440.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599565296fkpvsmdnmxloc7/22kyn1259956440.ps (open in new window)


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


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


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


 
Parameters (Session):
par1 = Aandelenkoers ; par2 = belgostat ; par3 = euronext brussel ;
 
Parameters (R input):
par1 = 12 ; par2 = belgostat ; par3 = euronext brussel ;
 
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