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 20:59:26 +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/t1293569840ttma8u0oeow7szz.htm/, Retrieved Tue, 28 Dec 2010 21:57:22 +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/t1293569840ttma8u0oeow7szz.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 «
235243 230354 227184 221678 217142 219452 256446 265845 248624 241114 229245 231805 219277 219313 212610 214771 211142 211457 240048 240636 230580 208795 197922 194596 194581 185686 178106 172608 167302 168053 202300 202388 182516 173476 166444 171297 169701 164182 161914 159612 151001 158114 186530 187069 174330 169362 166827 178037 186413 189226 191563 188906 186005 195309 223532 226899 214126 206903 204442 220375 214320 212588 205816 202196 195722 198563 229139 229527 211868 203555 195770
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
1235243235243000
2230354232283.475300317-3118.98546718632-1929.47530031745-0.787770786139232
3227184226737.043058758-4667.55045327995446.956941242212-0.314224091923093
4221678221561.922420082-5005.54543250559116.077579917826-0.071999339595215
5217142216898.935455963-4777.82355696093243.0645440372230.0449541604538859
6219452217433.461776764-1312.927779504732018.538223236140.688572060871794
7256446245673.03913041918012.03438936110772.96086958083.85734568502129
8265845267933.87159681920797.4692310085-2088.871596819060.554935040690873
9248624260257.1261157882125.53403808093-11633.1261157883-3.71935122915677
10241114244536.289229718-9574.88059089592-3422.28922971804-2.33087005318605
11229245229277.411038897-13300.5565978056-32.411038896804-0.742179145405557
12231805226913.205900511-6132.79097415864891.794099489011.42785852085247
13219277220596.426578587-6252.94520354418-1319.4265785873-0.0240284551797335
14219313218258.291322507-3684.648278104731054.708677492540.520038923266318
15212610211882.273225669-5403.86472967043727.726774330758-0.33946396850086
16214771210534.651651769-2851.44995524084236.348348231290.515689148976804
17211142211986.062548644-109.067057220854-844.0625486438470.550216572046135
18211457219667.0088391534826.62660617173-8210.008839153040.97900546599519
19240048230625.9368586288692.091255207469422.06314137180.769657809871539
20240636235259.813435476129.75800313565376.18656452976-0.510881514528709
21230580236834.3429670433249.43051961296-6254.34296704321-0.573777676921273
22208795218436.564653128-10440.6554181222-9641.56465312842-2.72716790482247
23197922202030.328090383-14211.3805973328-4108.32809038303-0.751187175939356
24194596188821.104848968-13578.70132617925774.895151031650.126098282857188
25194581190553.625863171-3909.595324754634027.374136828911.932342386762
26185686184778.249522188-5089.45660868973907.750477812478-0.2354425777624
27178106178163.860071679-6046.06533564857-57.8600716789767-0.189976400953351
28172608170360.121716464-7142.23398362552247.87828353585-0.219140218164648
29167302169410.018440859-3261.32092299261-2108.018440859470.776881772309404
30168053176474.5379227293213.05582589735-8421.537922729161.28832533634249
31202300189940.0551745689617.9638937486412359.94482543161.27393816818813
32202388196887.8340236777950.656907629815500.16597632308-0.332184095681747
33182516186807.23545374-3321.57149718465-4291.23545373993-2.24587418391417
34173476180162.302467512-5400.04613149327-6686.30246751232-0.414047163981782
35166444172531.68125591-6794.52712687721-6087.68125591043-0.277821536677563
36171297169600.330112866-4380.245122491721696.669887134490.481335141427902
37169701164873.355591314-4597.105855103484827.64440868621-0.0432704221247869
38164182160991.666746623-4149.742743994883190.333253377340.089111366597111
39161914159351.935854454-2586.578087342962562.064145545660.310929178690287
40159612159043.357433323-1171.65522107888568.6425666771290.282279828668302
41151001158348.976122202-874.530947359976-7347.976122201820.0593581284609816
42158114167694.4066798145495.7522704793-9580.406679813721.26920530017726
43186530173559.3800652155725.4808413809112970.61993478450.0457091639308827
44187069175926.921392243638.6280863977511142.0786077599-0.415535207167158
45174330177636.0987662442439.16335767283-3306.09876624417-0.238959092548035
46169362176635.221022719299.840975595553-7273.22102271888-0.426228488063223
47166827174832.720507105-1007.54407215932-8005.72050710466-0.260527834256694
48178037175280.961486966-102.0608997057342756.03851303430.180519749166594
49186413179870.8754957552817.972729182156542.124504245040.582122455906605
50189226185671.8835858034673.289049617223554.116414197330.36942268709986
51191563189675.8749078474258.059102480381887.12509215314-0.082643755255516
52188906190335.8182216492028.99532284567-1429.81822164902-0.444422383109327
53186005195991.2718979714278.53217885679-9986.2718979710.448956904681937
54195309204153.796506016690.55331169134-8844.796506010420.48074346176637
55223532210076.9414392766214.386918862213455.0585607243-0.0947850942146274
56226899215171.0587239925520.1181184475911727.9412760083-0.138217594040503
57214126217029.4058390823251.52539822038-2903.40583908191-0.451886535516855
58206903214883.799169536-92.7381171694744-7980.79916953632-0.666379595495791
59204442213310.665913817-1010.2650646007-8868.6659138167-0.182874987463589
60220375217561.5951678952251.931518300712813.404832105340.650301218751216
61214320212156.014582494-2497.65807780062163.98541750632-0.946444689196778
62212588208105.379468978-3460.182095307564482.62053102215-0.191637979443586
63205816203063.437639888-4438.833847470222752.56236011208-0.194837158824675
64202196203404.570810108-1484.02833993371-1208.570810107570.588965764473686
65195722206204.1517655351166.2399327503-10482.15176553510.528666137790662
66198563207629.7468657371326.85416587885-9066.746865737360.0320147999893518
67229139213566.2888031574180.3698974056715572.7111968430.568183536881156
68229527216885.8047703343648.0607662484312641.1952296657-0.105972790114439
69211868214846.136836091133.325135065316-2978.13683609107-0.700038566080598
70203555212339.306904918-1498.14441994838-8784.30690491777-0.325106632455227
71195770207585.790379837-3510.52938433171-11815.7903798365-0.401137466304889
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569840ttma8u0oeow7szz/17azr1293569961.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293569840ttma8u0oeow7szz/17azr1293569961.ps (open in new window)


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


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


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


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