Home » date » 2010 » Dec » 29 »

*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, 29 Dec 2010 13:56:47 +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/29/t1293630877x6d0teh9w00k0yl.htm/, Retrieved Wed, 29 Dec 2010 14:54: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/2010/Dec/29/t1293630877x6d0teh9w00k0yl.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 «
3106.54 3125.67 3039.71 3051.67 3112.83 3228.01 3223.98 3328.8 3264.26 3394.14 3549.25 3744.63 3839.25 3912.28 3911.06 3675.8 3703.32 3795.91 3906.01 4070.78 4144.38 4140.3 4388.53 4433.57 4305.23 4471.65 4614.76 4697.86 4639.4 4384.47 4350.83 4325.29 4441.82 4162.5 4127.47 3722.23 3757.12 3719.52 3925.43 3751.41 3168.22 2994.38 3136 2672.2 2100.18 1881.46 1908.64 1900.09 1696.58 1748.74 1953.35 2071.37 2030.98 2169.14 2229.85 2480.93 2525.93 2475.14 2529.66 2453.37 2386.53 2517.3 2457.46 2589.73 2679.07 2506.13 2592.31
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
13106.543106.54000
23125.673124.689318688831.251425112482510.9806813111672450.0701190497998039
33039.713038.87740252377-5.770417479535070.8325974762276-0.54236220066074
43051.673050.81063743179-3.802839037381180.8593625682128910.108422757246245
53112.833111.88575314774.928779304922680.9442468523018470.391980985245461
63228.013226.9435349884521.64515204035531.066465011546020.658600675593157
73223.983222.9373340481217.43878496298221.04266595188172-0.152266368909523
83328.83327.6902918936432.49287726274931.109708106361110.515588687799304
93264.263263.2114853220515.21811888333031.04851467794636-0.570545983250874
103394.143393.0323273338636.07466899381471.107672666143560.672615757781974
113549.253548.0922423884258.03377690894571.157757611584190.697169089904114
123744.633743.4252126666783.60592405690581.20478733333120.80356803168967
133839.253844.9430805604986.7855505421687-5.693080560493490.122668586958991
143912.283912.2042046333983.19722699851070.0757953666066259-0.0964490344360934
153911.063910.9350983529367.26528088092890.124901647072729-0.49312600793646
163675.83675.5323763417110.08965773182580.267623658294913-1.76692172616402
173703.323703.0590438771513.38694500916250.2609561228508370.101792253315551
183795.913795.6736062269928.37884307950330.2363937730078780.462508757414791
193906.013905.7941504905243.85355189812150.2158495094776510.477191059563207
204070.784070.5887906179466.75627872405980.1912093820571460.706040926340599
214144.384144.1899210225168.05276791498450.1900789774881160.0399602384641640
224140.34140.1002639224954.38623652509030.199736077512712-0.421175029116889
234388.534388.3512983629791.11529578642690.1787016370249521.13182186307676
244433.574433.3872460096282.3846312895290.182753990375473-0.269024541656719
254305.234342.0555406208249.9482114462747-36.8255406208213-1.10065174031667
264471.654467.2120408642463.90348197596354.437959135758610.397606353006847
274614.764610.3587059305878.92670145347574.401294069424310.462418524703577
284697.864693.460271464579.71801822026724.399728535501390.0243651508779043
294639.44634.9582632756453.52269864063724.44173672435856-0.80674947354213
304384.474379.9522641173-4.945095334200864.51773588270437-1.80092209209552
314350.834346.30653406083-10.38380322408484.52346593917359-0.167538833016132
324325.294320.76408113751-13.25628151244594.52591886248543-0.0884919552986306
334441.824437.3111053055511.34055544867164.508894694449480.757781890025354
344162.54157.96020455389-43.7435157083244.53979544610951-1.69708175270366
354127.474122.93095535312-42.09221401839724.539044646878430.0508757579892298
363722.233717.66559458979-110.9117688223064.56440541021064-2.12031998516170
373757.123784.04264720296-77.619078703553-26.92264720295621.09406009017536
383719.523716.95981732916-75.65379118084032.560182670841470.0573054390452646
393925.433922.96779140471-22.25900589450372.462208595292271.64384351828422
403751.413748.90499585756-51.0315649457062.50500414243667-0.886045379760065
413168.223165.59337741966-151.9083300858412.6266225803372-3.10702481330344
422994.382991.74931522539-156.0653024922532.63068477460612-0.128050331154495
4331363133.41400249031-99.6452568322552.585997509685831.73808029465606
442672.22669.5696973351-168.6601306163722.63030266489928-2.1261831504745
452100.182097.50992273194-245.1029554916292.67007726806079-2.3550973951135
461881.461878.79203127967-240.1030804488092.667968720325130.154042516060985
471908.641905.98934456817-189.450485546382.650655431830821.56059160643903
481900.091897.44884179425-155.1684684520392.641158205748811.05622867030751
491696.581727.11381190715-158.023333490752-30.5338119071476-0.0923402614704458
501748.741744.47797756568-125.2013203752424.262022434319850.96902374367647
511953.351949.17923184803-62.66590467335594.170768151965651.92555722464145
522071.372067.23974768834-28.41262474928524.13025231165871.05493282760480
532030.982026.84757103887-30.68293541043334.13242896112935-0.0699308060339351
542169.142165.032439237761.318605048332644.107560762241940.985811634930953
552229.852225.7495288917112.57470920124224.100471108285340.346766638977508
562480.932476.8526039709057.77562294411864.077396029096651.39255898252069
572525.932521.8516021887255.35447582979754.07839781127486-0.0745931329995134
582475.142471.0548563462235.23902117832794.08514365377511-0.619747716700826
592529.662525.5758494999638.89292552462964.084150500035210.112576340233638
602453.372449.2810408320717.06495607200474.08895916792645-0.672521988120713
612386.532434.020749383510.9718434668685-47.4907493834995-0.195202294185455
622517.32512.5088587127223.63425370117424.791141287275890.376783040432569
632457.462452.649702271087.808223386946884.81029772892422-0.487358129773467
642589.732584.9428508171131.40142776669034.78714918288580.726674099295957
652679.072674.2915842686742.38323241501074.778415731332750.338280323511151
662506.132501.325278782271.573170911359024.80472121772591-1.25719688562009
672592.312587.5136560563717.60792687736124.796343943633180.493992204352127
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/1s90x1293631002.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/1s90x1293631002.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/2s90x1293631002.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/2s90x1293631002.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/3l0h01293631002.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/3l0h01293631002.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/4eayl1293631002.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/4eayl1293631002.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/5eayl1293631002.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293630877x6d0teh9w00k0yl/5eayl1293631002.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