Home » date » 2010 » Dec » 28 »

PAPER

*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, 28 Dec 2010 18:07:59 +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/28/t1293559669dy7i6vfn0wzvb8k.htm/, Retrieved Tue, 28 Dec 2010 19:07:49 +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/28/t1293559669dy7i6vfn0wzvb8k.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 «
26548 26752 26967 27034 27056 27476 28497 29085 28720 29067 29249 29672 29761 30066 30315 30571 30757 30742 31310 31381 31470 31226 31081 31061 31114 30828 30418 30195 29877 29192 29876 29409 28458 28340 28164 28438 28053 27599 27226 27119 26625 26541 27023 26631 26154 26029 26008 26632 27010 27041 27244 26976 26715 27017 27714 27655 27103 27088 26968 27770 27616 27481 27279 26918 26503 26547 27467 27305 26259 26048 25743
 
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
R Framework
error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
12654826548000
22675226715.071160153720.639042287058936.92883984631910.655157802561565
32696726905.984857443760.652445081584361.01514255630790.797201645473681
42703427023.336842896178.338784825386610.66315710393640.260047571583508
52705627064.502622790365.9119502713695-8.50262279034184-0.163277419399898
62747627371.7479631305148.157340019902104.2520368695051.05359781154324
72849728251.0395063614399.416856521773245.9604936386243.19443636634054
82908529029.5396239157530.19791770960755.46037608434491.65696680734548
92872028972.3331143086327.219979063559-252.333114308634-2.56773172212168
102906729067.6843740869247.046495247978-0.684374086876244-1.01358872503052
112924929237.9329865949220.48475630364111.0670134050717-0.335726035983488
122967229600.61195138269.67163337558471.38804861998610.62164125467645
132976129878.9303215381272.580636832681-117.9303215380660.0404532214802299
143006630100.7268984668255.444053548699-34.7268984668399-0.208407717797834
153031530273.8784421762228.50537359574341.1215578238274-0.335766994045634
163057130507.164335154230.10219649927363.83566484598580.0204911994051311
173075730807.9256950309253.991899944700-50.92569503094470.301274491280909
183074230943.3158692665213.941770040189-201.315869266538-0.502871907000844
193131031170.7751718584218.499799397522139.2248281416460.057433184126269
203138131223.3671993483162.539170526016157.632800651745-0.706683206745636
213147031558.1445332407220.677054601602-88.14453324072250.734636757521303
223122631387.747867198688.630822864254-161.747867198606-1.66873740076928
233108131192.8057916132-7.01679000012729-111.805791613217-1.20870955964957
243106131025.9858320732-60.736463395501235.0141679267804-0.681669535008176
253111431118.5431277041-9.17458033242673-4.543127704077050.667213170070226
263082830922.2405160452-72.0196421270532-94.2405160452136-0.787468975070231
273041830505.9314245896-185.848338749833-87.9314245896289-1.42399743668197
283019530182.3792107237-231.54544942195212.6207892762570-0.582334562156756
292987729903.6335795030-247.348888625837-26.6335795030399-0.200384461419676
302919229474.2476114323-308.373187248733-282.247611432276-0.768536563314524
312987629538.9891794660-183.468990414924337.0108205340461.57354403807739
322940929350.1184862488-185.27675971141858.8815137512226-0.0228176816561006
332845828638.7705933574-361.412617010191-180.770593357424-2.22515972296892
342834028337.9811361967-341.1168307147492.018863803266320.256453293310451
352816428175.7477639450-281.308069745666-11.74776394503510.756318845029209
362843828297.0663171147-146.845539897833140.9336828852791.70787769093953
372805328049.3665674207-180.6028596230563.63343257928044-0.430305741362482
382759927645.856288222-255.093863319666-46.8562882220065-0.93750543967464
392722627286.7875299428-289.55776432753-60.7875299428079-0.432883522008801
402711927050.9348063584-271.76029384992868.06519364160540.225823654725565
412662526672.4922305923-307.302956533675-47.4922305923384-0.451044796960724
422654126777.099526657-169.785940146996-236.0995266569861.73628166490649
432702326661.0145033727-151.872400451269361.9854966273290.225817688612905
442663126422.958069467-180.60104905316208.041930533002-0.36248289620195
452615426323.5026762431-153.555466889015-169.5026762430910.341553227503716
462602926142.7316996139-162.622893656690-113.731699613897-0.114577876487621
472600826107.9018622941-120.079539737631-99.90186229409920.538356921112227
482663226315.6778733876-10.9104029941995316.3221266123731.38542830379758
492701026750.8104979997137.862005144066259.1895020003041.88731956683512
502704127023.3869063740182.73239144848617.61309362604930.565419162152878
512724427287.3208057622209.649665502674-43.32080576216170.338836017499217
522697627081.585946214572.0876033019442-105.58594621454-1.74201812991879
532671526962.47194435138.56889468535878-247.471944351268-0.805671148517118
542701727168.543214714274.3147573654074-151.5432147142030.831287997757693
552771427306.092518918695.3583562041105407.9074810813780.265488155779644
562765527439.9359010357108.154237456146215.0640989643310.161431691995990
572710327338.144392694538.3912689838747-235.144392694536-0.880788600479137
582708827276.07393198765.02562760095843-188.073931987641-0.421668242536758
592696827224.1795054151-13.8739147793201-256.179505415110-0.239236439101584
602777027497.806007415581.6591018419422272.1939925845191.21123276927662
612761627480.496171810948.7349271617143135.503828189074-0.416863820866641
622748127475.658517435530.93342591748245.34148256450683-0.224460930549671
632727927259.1910362491-51.018177595388919.8089637508565-1.03283995756840
642691827026.6762417456-111.080188538592-108.676241745629-0.759908093071657
652650326845.9197240207-134.182259343628-342.919724020668-0.292829396133781
662654726720.4351493483-131.293367897765-173.4351493483310.0365501859303891
672746726921.4242579236-20.92553380533545.5757420764271.3933213515838
682730526995.430348607410.5778877407435309.5696513926150.397467970756622
692625926624.1528325546-116.033069044342-365.152832554619-1.59832629851900
702604826300.1312311149-184.958543233422-252.131231114932-0.871155018129837
712574326098.731979908-190.407261880979-355.731979908003-0.0689744663970854
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/1tzyo1293559675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/1tzyo1293559675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/2tzyo1293559675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/2tzyo1293559675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/3yn8k1293559675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/3yn8k1293559675.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/4re7n1293559675.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293559669dy7i6vfn0wzvb8k/4re7n1293559675.ps (open in new window)


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