Home » date » 2009 » Dec » 11 »

Shwws9_v2

*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: Fri, 11 Dec 2009 09:22:50 -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/11/t1260548617z528ribzkqka7ch.htm/, Retrieved Fri, 11 Dec 2009 17:23:43 +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/11/t1260548617z528ribzkqka7ch.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 «
102.1 102.86 102.99 103.73 105.02 104.43 104.63 104.93 105.87 105.66 106.76 106 107.22 107.33 107.11 108.86 107.72 107.88 108.38 107.72 108.41 109.9 111.45 112.18 113.34 113.46 114.06 115.54 116.39 115.94 116.97 115.94 115.91 116.43 116.26 116.35 117.9 117.7 117.53 117.86 117.65 116.51 115.93 115.31 115
 
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
1102.1102.1000
2102.86102.7651514570350.064210660289750.04729817221037920.811371258374927
3102.99102.9373429002850.08308504315616820.03756182997754580.189765895420029
4103.73103.5880039979620.2119516448153530.0677148641343350.954909891260168
5105.02104.8127068590190.4701987972164560.08125817212200511.65487858208892
6104.43104.5405616329290.270205063345090-0.0205258726395394-1.19559366289446
7104.63104.6134116138140.2156074385792030.0402172397717256-0.315576160168867
8104.93104.8801393986160.2299329066810370.04377900013261620.081455708723675
9105.87105.7275221684960.4040503694342760.06924931447699640.982188462873182
10105.66105.7059692363830.2836632523946290.00443160071438382-0.676473794049252
11106.76106.6091777223910.4591742087232520.07750616066761950.984369587066293
12106106.1331276809320.194036528702973-0.0224910439118621-1.48569097016466
13107.22107.1251122952670.4111947617594920.004518429295176101.45667327957439
14107.33107.3427669084530.3587216214451860.003821206714052-0.260008449393046
15107.11107.2307107163950.227692677879219-0.0680454006315661-0.739681292772364
16108.86108.6424708812810.561357593691550.08358388555261111.86501983542233
17107.72107.9338392154720.203509707592572-0.070446551532578-1.99747126935286
18107.88107.9342054686260.146308209952554-0.0312448268648332-0.319764662433646
19108.38108.3198495712430.2136862987592390.03307819896455320.376964778916922
20107.72107.8890395389100.0322513933179768-0.0961080204849495-1.01545858717818
21108.41108.2653897136300.1291240490668350.1056624496303890.542271327969
22109.9109.7143262014060.5007154489065630.03625885323724282.08026990939708
23111.45111.1936136543700.7762548362922930.1455878914989561.54261026183656
24112.18112.2522793263140.855671935194427-0.1042037934275100.444689780661887
25113.34113.2248107592440.8880899731401580.1020490691702360.196644175735931
26113.46113.5202127889150.725146290757188-0.00276096361689073-0.85787675926491
27114.06114.2448206012990.724996985899211-0.184762113724858-0.00083967605545427
28115.54115.2857356040740.8135198961723320.2193995386410740.495729607223135
29116.39116.3980292695920.897292134789788-0.04091892425522960.467859690556891
30115.94116.2515566857100.604801409303994-0.196582891669543-1.63528753513486
31116.97116.8445246464640.6014860111413430.126779821009020-0.0185506130058656
32115.94116.3004019858850.280522780961716-0.234065698926343-1.79648518578687
33115.91116.0036492990620.118780668329578-0.0299736903632424-0.90543196184608
34116.43116.3995249954280.196424933136498-9.530930384552e-050.434686592306393
35116.26116.2379255508050.09611012786667530.0615700667171395-0.561600288915193
36116.35116.4358111080180.1245715588933-0.09701172134221190.159495425282006
37117.9117.4178215199020.3631987535106210.3871266083505251.39661150407570
38117.7117.7275512459820.348419018330608-0.0221249495079620-0.0798484402436809
39117.53117.8268744287110.279472100006796-0.270231867062211-0.386690010795041
40117.86117.7732807844390.1864878730129090.122969793321466-0.521370824042164
41117.65117.6633671947820.1036385423551620.0188137010861343-0.462937653020033
42116.51116.923002540769-0.132163703558486-0.321356449630923-1.31836801891653
43115.93115.88208675318-0.3860046449974040.146662301323176-1.42032071118767
44115.31115.466804163221-0.394182837006596-0.153621309674475-0.0457758208463296
45115115.065385319931-0.396204205777226-0.0645984848540805-0.0113159082216976
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/1ye721260548568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/1ye721260548568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/25o8q1260548568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/25o8q1260548568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/3bxdp1260548568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/3bxdp1260548568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/4cq0p1260548568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/4cq0p1260548568.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/51e4a1260548568.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260548617z528ribzkqka7ch/51e4a1260548568.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