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:57:19 +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/t1293562536jqyxhb0d4165rla.htm/, Retrieved Tue, 28 Dec 2010 19: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/2010/Dec/28/t1293562536jqyxhb0d4165rla.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 «
9782 9938 10111 10259 10419 10622 11173 11542 11538 11837 12060 12423 12791 12891 13098 13418 13614 13653 13980 14087 14332 14232 14226 14186 14310 14152 14127 14163 13964 13811 14440 14724 14790 14961 15117 15452 16080 16284 16524 16782 16663 16678 17448 17745 17789 17864 18079 18483 19037 19344 19590 19862 20207 20593 21253 21507 21528 21818 22205 22621 23006 23178 23358 23519 23725 23789 24472 24773 24477 24669 24827
 
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'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
197829782000
299389918.9360577939623.554930142180419.06394220604170.857758874105988
31011110077.976054696771.418823068492433.02394530324941.03391890128237
41025910241.9844164491110.15793772200017.01558355091920.659212746247292
51041910406.5785907746133.35364531619612.42140922538770.382204322318611
61062210604.5079824549161.00472137439817.49201754512720.455522951897839
71117311096.8818781177303.27422355850476.118121882352.34218720351826
81154211530.2526931791359.18858180153511.74730682092810.920043660299011
91153811604.6584682778236.747127652393-66.658468277833-2.01433451811386
101183711815.6822868926225.68580365421621.3177131074291-0.181964701118438
111206012049.7198196101229.27743902457410.28018038991350.0590835175226261
121242312391.7719120008277.77808663885931.22808799916540.797847831202871
131279112802.4347566347333.40431774105-11.43475663474291.0182222328493
141289112943.2312624623254.498123428254-52.2312624623293-1.21970181446696
151309813101.9885692694215.731152229803-3.98856926944557-0.643610112578598
161341813383.942655519243.42799201410934.05734448100740.457873754561834
171361413617.8511518545239.435723160518-3.85115185447749-0.065140366893704
181365313747.6680774390193.580505235018-94.668077439033-0.751501867438058
191398013940.3792362616193.21676459101739.6207637384379-0.00597939200671672
201408714044.9557571788156.1025472750942.0442428211844-0.610490613766667
211433214348.5105881860217.867215995426-16.51058818603651.01604471599163
221423214297.3195042576105.142820750440-65.319504257613-1.85440458507655
231422614268.609910528549.1019139696661-42.6099105285166-0.921850048890431
241418614207.84399279643.25978471960693-21.8439927964456-0.756502855574918
251431014242.020842642816.168526824347967.97915735719910.218397238532523
261415214196.3609551045-9.37915394003732-44.3609551045374-0.412626619824681
271412714156.5532715461-21.7715066267317-29.5532715461194-0.203793908346721
281416314127.5825656126-24.747002079052435.4174343874204-0.0493257421586975
291396413975.5052227228-77.6776467929766-11.5052227228487-0.867776581287822
301381113898.0667463759-77.5784066346216-87.0667463758570.00162616033679722
311444014264.5582527841106.584526260075175.4417472158853.0259345771543
321472414668.8617725076230.14040193718455.13822749242462.03219630061857
331479014793.2669073079186.232847218396-3.26690730789285-0.722291908257976
341496114990.6077211864190.845302206966-29.60772118641290.075875607105275
351511715147.5312625351176.778770566811-30.5312625351364-0.231450508482369
361545215446.6659404892227.4255614090095.334059510765220.836979558777251
371608015925.3483768262331.712867723907154.6516231738421.73282326886379
381628416314.3959474695355.372979925942-30.39594746949580.386059568765797
391652416570.7843181975314.913810732776-46.7843181974516-0.664351702594299
401678216734.5658830091252.73892915418347.4341169909307-1.02894724481577
411666316737.2689014171149.313078418830-74.2689014171212-1.70067336348240
421667816881.1309339626147.059879220053-203.130933962555-0.0369512761697523
431744817279.9468243233251.030098652220168.0531756766881.70776145768666
441774517639.5211453030295.873755238496105.4788546969610.73744008709896
451778917823.2997972484249.539611398962-34.2997972484466-0.76216746296519
461786417917.8199671701185.479043967609-53.819967170118-1.05379037834552
471807918131.6598161127197.18489594113-52.65981611268310.192706237903397
481848318502.7594778068268.942951931884-19.75947780682621.18523919452177
491903718878.5494346319313.115456239103158.4505653681010.729674662258837
501934419317.5193518114364.94962767941126.48064818863130.848644211941166
511959019612.0777526598336.135116962810-22.0777526597913-0.473193731154397
521986219784.0579077626268.74177311237977.9420922373997-1.11328493507764
532020720230.1217288908341.856011914412-23.12172889079421.20391581444042
542059320814.7527761654441.969431500659-221.7527761654331.64349683261922
552125321155.6571047633400.33189831272697.3428952366934-0.683867501769733
562150721403.3651845512337.453653047335103.634815448782-1.03379448313649
572152821558.7435182918262.42235669579-30.7435182917968-1.23410481749973
582181821859.0572268274278.032002385217-41.05722682735860.256800682792461
592220522268.2388418921332.02036228875-63.23884189205230.889103448178963
602262122659.7666454220356.526362045662-38.7666454220240.404409472118186
612300622908.8147847302312.21131306523097.1852152697695-0.73031651206288
622317823137.2946497613277.78156940526340.705350238717-0.564538662633011
632335823350.0137753084251.1375827509927.98622469161922-0.437690458610266
642351923521.8280880134218.608602319280-2.82808801337982-0.536673749048284
652372523800.6725805192243.390825046013-75.67258051916080.408283128732295
662378923998.4602877774224.618263759952-209.460287777367-0.308444981187799
672447224301.2340525172256.765218253769170.7659474827560.528045894338038
682477324606.4727019610276.696631818557166.5272980389520.327635917544852
692447724603.1372762029161.553761037450-126.137276202922-1.89368671991159
702466924747.0497842964154.302212659892-78.0497842963931-0.119314672324533
712482724907.7049872053156.912892804107-80.7049872053280.043001299764418
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293562536jqyxhb0d4165rla/13aai1293562635.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293562536jqyxhb0d4165rla/13aai1293562635.ps (open in new window)


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


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


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


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