Home » date » 2009 » Dec » 09 »

Shw9

*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: Wed, 09 Dec 2009 08:53:17 -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/09/t1260374045j7c5xd7r1u7cmhz.htm/, Retrieved Wed, 09 Dec 2009 16:54: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/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz.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 «
0.7461 0.7775 0.7790 0.7744 0.7905 0.7719 0.7811 0.7557 0.7637 0.7595 0.7471 0.7615 0.7487 0.7389 0.7337 0.7510 0.7382 0.7159 0.7542 0.7636 0.7433 0.7658 0.7627 0.7480 0.7692 0.7850 0.7913 0.7720 0.7880 0.8070 0.8268 0.8244 0.8487 0.8572 0.8214 0.8827 0.9216 0.8865 0.8816 0.8884 0.9466 0.9180 0.9337 0.9559 0.9626 0.9434 0.8639 0.7996 0.6680 0.6572 0.6928 0.6438 0.6454 0.6873 0.7265 0.7912 0.8114 0.8281 0.8393
 
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
10.74610.7461000
20.77750.775885529664350.002486998247070850.001614470335651040.618750517320381
30.7790.7774419711053640.002348382844518840.00155802889463608-0.0301541419735241
40.77440.772848345264960.001003468937972890.00155165473504048-0.218786311683760
50.79050.7888311088645760.004326666753306570.001668891135424300.463803478791201
60.77190.770449902061507-0.001089118954394760.00145009793849276-0.695521853286597
70.78110.7794307112525940.001408479438122980.001669288747406240.306495432974868
80.75570.754258136760836-0.005326435438195190.00144186323916443-0.806162779114748
90.76370.762009699569943-0.001974005551705350.001690300430057380.395850547580657
100.75950.75794341493708-0.002513770082598580.00155658506292036-0.0632609218882115
110.74710.745558139433298-0.005069307648495970.00154186056670222-0.298290731983266
120.76150.75980486981006-5.92090109411145e-050.001695130189939780.583489434363387
130.74870.7643419807344460.00109175681835272-0.01564198073444590.160974038159959
140.73890.738165422876601-0.005658476240777040.000734577123398706-0.690237273279185
150.73370.732803592450955-0.005581396947874260.0008964075490449650.00894276803303716
160.7510.7501503975513230.0003768583751465240.0008496024486771030.690735297915322
170.73820.737364550104456-0.003042088074146540.000835449895543552-0.39675690407421
180.71590.715474316239343-0.007937008845718330.000425683760656951-0.568267801972448
190.75420.752669851154130.003783415333339570.001530148845869391.36095496369854
200.76360.7630960887399250.005508474511254270.0005039112600745440.200334377177951
210.74330.742675162217303-0.001225176327126950.000624837782696836-0.782041889583183
220.76580.7646499742287840.004799804228665070.001150025771215690.699762163944851
230.76270.762197082991350.002916207070602650.000502917008650255-0.218773271919558
240.7480.747263424487018-0.001718852190154000.00073657551298153-0.538335725945388
250.76920.7726786452321730.00522571134906362-0.003478645232172560.882313761775195
260.7850.7845066996108250.006888352813451530.000493300389175170.179755082805423
270.79130.7911272719006370.006818861629291910.000172728099362487-0.00807049813824836
280.7720.7717775237490972.43195478266522e-050.000222476250903224-0.787872467840286
290.7880.7868365522187380.00392628097134650.001163447781261800.452877667940988
300.8070.8072218838483450.00819724131223787-0.0002218838483446450.495875188494861
310.82680.825714314901950.01086858163388290.001085685098050570.310206681448403
320.82440.8241069575920990.007631443359000890.000293042407901490-0.375945130869039
330.84870.8484221402149290.01196039807863510.0002778597850711270.502769422439874
340.85720.8565132861870960.01095642375637040.000686713812903671-0.116606089115199
350.82140.821587886566007-0.0009494369835858-0.000187886566006950-1.38283996096273
360.88270.8815444472787350.01485001248749810.001155552721265021.83502479584584
370.92160.9228381330232470.0216506028565576-0.001238133023247430.837243790038453
380.88650.8875595132573910.0071961176569999-0.00105951325739133-1.59852617972725
390.88160.8819191284703480.00386926739285232-0.000319128470347547-0.386692495514300
400.88840.889097262315070.00472761964790711-0.000697262315069960.0995574782171932
410.94660.945659276894110.01816898281766350.0009407231058901261.56027693941272
420.9180.9203719607172690.00690157152643476-0.00237196071726866-1.30830420667872
430.93370.9329362439659480.008369739754853430.000763756034051820.170497684733044
440.95590.9565520674271080.0123225345743226-0.000652067427107970.45906983555905
450.96260.9635647622130180.0109458686324665-0.00096476221301819-0.159889713638003
460.94340.9431373130617340.002811687219012230.000262686938265963-0.944749038281431
470.86390.867100060639984-0.0176328114461369-0.00320006063998362-2.37460735984882
480.79960.80009862361249-0.0304276091756617-0.000498623612489193-1.48610844652289
490.6680.671794007468285-0.0556509632105046-0.00379400746828511-3.05519372172811
500.65720.656387762610567-0.04538517313205690.0008122373894332221.14963321012992
510.69280.690077083944275-0.02491308776629950.002722916055725392.38070923924700
520.64380.645467305163713-0.0300186687795213-0.00166730516371247-0.592277279318708
530.64540.641793879158155-0.02319192068231160.00360612084184520.792502912123001
540.68730.687254541144807-0.005404158764787614.54588551929221e-052.06550810899139
550.72650.7244602191090880.005635550732370560.002039780890911791.28207131466889
560.79120.7898937633958140.02112834614250670.001306236604185561.79932930521796
570.81140.8115171850820490.0212566133459178-0.0001171850820486080.0148974212061835
580.82810.8257389722396420.01943395535946670.00236102776035813-0.211694998477516
590.83930.840953891705430.0183407761174926-0.00165389170542903-0.126972340707844
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/1ot7o1260373993.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/1ot7o1260373993.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/2e4yr1260373993.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/2e4yr1260373993.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/3elgk1260373993.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/3elgk1260373993.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/4gavu1260373993.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/4gavu1260373993.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/54o661260373993.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260374045j7c5xd7r1u7cmhz/54o661260373993.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