Home » date » 2009 » Dec » 01 »

SHWWS9klasmeth3

*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, 01 Dec 2009 13:04:49 -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/01/t1259697938rib4tswsrficcb9.htm/, Retrieved Tue, 01 Dec 2009 21:05:45 +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/01/t1259697938rib4tswsrficcb9.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 «
161 149 139 135 130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137
 
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'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
1161161000
2149150.652804954134-7.54703501666725-1.65280495413439-1.63771582823087
3139138.982655708135-10.50007056698000.0173442918654433-0.526939710259491
4135133.864161340926-6.580525518829161.135838659073790.668550281526714
5130129.954139671962-4.655872224790190.04586032803782270.332322471049674
6127126.988868997811-3.433579630742730.01113100218940420.211954297131278
7122122.480802464784-4.21141819954527-0.480802464784292-0.134828025796281
8117117.299039632372-4.91378274889712-0.299039632372054-0.121747720423399
9112112.158059721224-5.0782043812403-0.158059721223623-0.0285009187671397
10113112.152979939957-1.406953577398170.847020060043210.636375230284341
11149143.07098081144421.98603504509265.929019188556374.05494630235283
12157160.04781350329518.3609133248431-3.04781350329533-0.628379465082242
13157159.9035998111935.10296396137905-2.90359981119305-2.38883808065303
14147149.560806664401-5.5817287150919-2.56080666440074-1.81943303091513
15137138.245352406242-9.49329810512953-1.24535240624249-0.687055826502149
16132130.547108147196-8.238550856204971.452891852804300.217680474947628
17125124.929951269511-6.415060991359590.07004873048883130.314266683881632
18123122.311131554423-3.777132309275870.688868445577340.457086040563384
19117117.442464820216-4.53720670332106-0.442464820216143-0.131772894658241
20114112.644613186522-4.71880499907281.35538681347791-0.0314766363061678
21111110.204986216342-3.13088283022340.7950137836575970.275251575401009
22112116.8836209727003.70319077371009-4.883620972699871.18467504374390
23144135.55933488430814.12773811587758.440665115691671.80694466832398
24150150.24913285492414.5182840473446-0.2491328549238280.0678343163534942
25149151.2414169445915.09798096032244-2.24141694459116-1.64794338283718
26134138.216390052434-7.37162961885366-4.21639005243418-2.14798335074383
27123125.000778753994-11.3489070289402-2.00077875399352-0.692409525363189
28116114.706233550882-10.62263258701031.293766449117570.126377475930886
29117115.506657540663-2.752155089030271.493342459336881.35936480510199
30111110.708874214596-4.157906341418630.291125785404126-0.243353609475447
31105104.903816307861-5.291232777878770.0961836921393925-0.196488507873823
3210299.9516012637417-5.05771213320452.048398736258320.0404777932819462
339595.9994195843924-4.29603794845461-0.9994195843924430.132029390768921
3493100.5759473627251.81514406999319-7.575947362725431.05934968470607
35124114.71673086953610.29492904781229.283269130464331.47009361589350
36130127.45892297925511.97736605849912.541077020745140.292347366832890
37124124.7785450061601.88230592681973-0.778545006160475-1.75505818445573
38115118.497472376771-3.70343843832279-3.4974723767715-0.965125704944754
39106109.174032358363-7.52463032938233-3.1740323583633-0.663538604465324
40105105.755526274766-4.71574222647919-0.7555262747659910.488514565709078
41105102.742947895194-3.548560385866112.257052104805650.201972304211223
4210199.8632794521701-3.091193519497511.136720547829870.0791583705697196
439594.6588556491954-4.536557410859670.341144350804620-0.250532278129223
449390.2396448656509-4.456206074269352.760355134349080.0139285858809953
458486.9085081809692-3.68554823403002-2.908508180969150.133585736338728
468795.8587024934274.96625720967545-8.858702493427021.49970820122581
47116107.1618905450029.300928990232328.838109454997830.751662415942542
48120114.5895970384358.019449868917995.41040296156527-0.222564300568298
49117116.7777512530164.026776125807340.222248746983824-0.69282149433411
50109112.572077361047-1.58619846105863-3.57207736104712-0.971012714933745
51105109.467059550568-2.61781299630844-4.46705955056778-0.178979442183705
52107108.081673612220-1.77786881547401-1.081673612220450.145955639649442
53109106.789387532202-1.446279453690662.210612467798470.0574403511461303
54109106.601581858759-0.5881910732627722.398418141241240.148539974470227
55108106.71782747458-0.1080145531643481.282172525420030.0832118945730557
56107104.475962916450-1.563782351061172.5240370835505-0.252350865505948
5799104.861227371625-0.233559643920123-5.861227371624580.230580814859165
58103112.4180243987975.08136494623352-9.41802439879680.921317388795852
59131121.5283687544387.82841854393139.47163124556230.476423357856821
60137130.1368840010818.36052690394736.863115998919460.0923648662541242
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/1oexb1259697887.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/1oexb1259697887.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/2kc7f1259697887.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/2kc7f1259697887.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/32dvd1259697887.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/32dvd1259697887.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/4y5011259697887.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/4y5011259697887.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/5nwl61259697887.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697938rib4tswsrficcb9/5nwl61259697887.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