Home » date » 2010 » Dec » 12 »

ws 8

*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: Sun, 12 Dec 2010 19:13:20 +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/12/t1292181070ugmwoeqc9d0vwmg.htm/, Retrieved Sun, 12 Dec 2010 20:11:11 +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/12/t1292181070ugmwoeqc9d0vwmg.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 «
1.3031 1.3241 1.2961 1.2865 1.2305 1.2101 1.2125 1.2350 1.2014 1.1992 1.1791 1.1832 1.2159 1.1922 1.2114 1.2614 1.2812 1.2786 1.2772 1.2815 1.2679 1.2765 1.3247 1.3191 1.3029 1.3234 1.3354 1.3651 1.3453 1.3534 1.3706 1.3638 1.4268 1.4485 1.4635 1.4587 1.4876 1.5189 1.5783 1.5633 1.5554 1.5757 1.5593 1.4660 1.4065 1.2759 1.2705 1.3954 1.2793 1.2694 1.3282 1.3230 1.4135 1.4042 1.4253 1.4322 1.4632 1.4713 1.5016 1.4318
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
11.30311.3031000
21.32411.323008000061590.001091999937057620.001091999938413780.284544909239405
31.29611.295123904439710.0009760955602891920.00097609556028919-0.691139502135368
41.28651.285565873070440.0009341269295550570.000934126929555057-0.251258608894471
51.23051.229790909132220.0007090908677748920.000709090867774893-1.35260712073784
61.21011.209474015784390.0006259842156119870.000625984215611988-0.501501141687857
71.21251.211867058860140.0006329411398566730.0006329411398566740.0421466676067974
81.2351.234281640666360.0007183593336373680.0007183593336373670.519516656049798
91.20141.200815175130860.0005848248691395620.00058482486913956-0.81534034466468
101.19921.198625969025090.000574030974911290.00057403097491129-0.0661627566561902
111.17911.178605791533990.0004942084660129810.000494208466012981-0.491183905484689
121.18321.182691923105790.0005080768942078540.0005080768942078540.0856688263444004
131.21591.20932887166569-0.000597375305090030.006571128334305430.75293148809392
141.19221.19317399995478-0.000973999974556624-0.000973999954777134-0.315695399333558
151.21141.21233738654445-0.000937386544454878-0.0009373865444548790.47979592591895
161.26141.26224510867252-0.000845108672518426-0.000845108672518431.21144001203051
171.28121.28200777574635-0.000807775746347255-0.0008077757463472540.491001863969149
181.27861.2794110108081-0.000811010808098767-0.000811010808098766-0.0426244735224776
191.27721.27801207204986-0.000812072049860374-0.000812072049860374-0.0140079541182102
201.28151.28230287767589-0.000802877675891391-0.0008028776758913920.121580816674373
211.26791.2687258527603-0.000825852760301605-0.000825852760301609-0.304355471633153
221.27651.27730896055146-0.000808960551459083-0.0008089605514590830.224176530719851
231.32471.32542128799443-0.000721287994432987-0.000721287994432991.16558964720041
241.31911.31982999997995-0.000729999979948916-0.000729999979948914-0.116031542813216
251.30291.29917518364635-0.0003386196689241490.00372481635365155-0.523037542810113
261.32341.323357764698964.22352932610852e-054.22353010408676e-050.530589056506489
271.33541.335343713279025.62867209832501e-055.6286720983248e-050.284481271817941
281.36511.365008920188779.10798112281102e-059.10798112281042e-050.705239422293093
291.34531.345232239156596.77608434091449e-056.77608434091454e-05-0.473219504090004
301.35341.353322833724457.716627555324e-057.716627555324e-050.191091427839903
311.37061.37050280701869.71929814008855e-059.71929814008849e-050.407361997632161
321.36381.363710864486938.91355130702872e-058.91355130702862e-05-0.164088274049579
331.42681.426637456244620.0001625437553844670.0001625437553844651.49668745598011
341.44851.448312354314590.0001876456854112250.0001876456854112260.512389438658394
351.46351.463295110596170.0002048894038292760.0002048894038292730.352395333095917
361.45871.458500930234940.0001990697650635440.000199069765063544-0.119069583823409
371.48761.48595504590463-0.0001495412815044540.001644954095373560.692932912639914
381.51891.518673739127740.0002262608665366720.0002262608722555750.730900620931029
391.57831.578022328410950.0002776715890463750.0002776715890463741.40798901159727
401.56331.563035590278560.0002644097214414230.000264409721441418-0.363519394857206
411.55541.555142671293010.0002573287069889510.000257328706988951-0.194265361851859
421.57571.575425303293750.0002746967062535840.0002746967062535850.476898929435036
431.55931.559039740260490.0002602597395102690.000260259739510268-0.396760884678923
441.4661.465820674740660.0001793252593376540.000179325259337662-2.22619133601994
451.40651.406372255833870.0001277441661321860.000127744166132181-1.4200222072003
461.27591.275885146803861.48531961446394e-051.485319614464e-05-3.11056414166282
471.27051.270489818808311.01811916942101e-051.01811916942064e-05-0.128842232932366
481.39541.395282155172160.0001178448278410880.0001178448278410852.97165750065224
491.27931.291440358964820.00110366899876624-0.0121403589648204-2.60057471451443
501.26941.268513724168550.0008862758564512740.000886275831450488-0.542525372398785
511.32821.327273811168010.0009261888319855960.0009261888319855961.37813188896661
521.3231.322078030306320.0009219696936837330.000921969693683727-0.145780612842954
531.41351.412516379907110.0009836200928908570.000983620092890862.13162597667844
541.40421.403223452548140.0009765474518569840.000976547451856987-0.244712200534846
551.42531.42430962199660.0009903780033966280.0009903780033966270.478864006604029
561.43221.43120556319030.0009944368097012940.0009944368097012950.140627257097516
571.46321.462184969118160.001015030881838560.001015030881838560.714022156876081
581.47131.470280109742920.00101989025707710.00101989025707710.168596272983934
591.50161.500560041127670.001039958872333320.001039958872333320.696759358298355
601.43181.43080856164730.000991438352697020.000991438352697016-1.68573192903972
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/1sksi1292181195.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/1sksi1292181195.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/23bsl1292181195.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/23bsl1292181195.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/3e29o1292181195.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/3e29o1292181195.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/4e29o1292181195.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/4e29o1292181195.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/57c8r1292181195.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292181070ugmwoeqc9d0vwmg/57c8r1292181195.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 1 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = 1 ;
 
Parameters (R input):
par1 = 12 ; par2 = 0 ; par3 = 0 ; par4 = 1 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = 1 ;
 
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