Home » date » 2009 » Dec » 06 »

WS9

*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: Sun, 06 Dec 2009 12:44:42 -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/06/t1260128724pv1txpb3h20remo.htm/, Retrieved Sun, 06 Dec 2009 20:45:31 +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/06/t1260128724pv1txpb3h20remo.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 «
286602 283042 276687 277915 277128 277103 275037 270150 267140 264993 287259 291186 292300 288186 281477 282656 280190 280408 276836 275216 274352 271311 289802 290726 292300 278506 269826 265861 269034 264176 255198 253353 246057 235372 258556 260993 254663 250643 243422 247105 248541 245039 237080 237085 225554 226839 247934 248333 246969 245098 246263 255765 264319 268347 273046 273963 267430 271993 292710 295881 293299
 
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
1286602286602000
2283042283653.978487577-193.757637766118-611.978487576924-0.512602058586361
3276687278740.990211037-626.91648573849-2053.99021103726-1.10434425180643
4277915277704.864198171-673.55551718559210.135801828790-0.101330739637021
5277128277273.640546886-640.785948258969-145.6405468858580.0584370187608226
6277103277214.827411661-551.988562908826-111.8274116612560.137775381399521
7275037275811.948393772-692.421269421379-774.948393772297-0.199101667700537
8270150271753.599507441-1275.95775947025-1603.59950744087-0.781314140029168
9267140267985.936032108-1721.42278317639-845.936032107815-0.575202190918298
10264993265328.515582245-1892.03633889931-335.515582244946-0.215266548845033
11287259280406.3589263741239.597535619586852.641073625963.8931729128653
12291186290440.1106591142875.28500374179745.889340885872.01424283726858
13292300291811.3900190012606.24837084285488.609980998629-0.372527026877422
14288186289098.6075505451618.16982635888-912.607550544624-1.16426911072216
15281477285178.999425359602.536601873665-3701.99942535885-1.19092457735949
16282656283206.224384905127.925516326566-550.224384904784-0.580264949079261
17280190281327.864600774-244.314731512342-1137.86460077385-0.452964131984537
18280408280367.008152864-377.43240381578940.9918471356168-0.160971815641822
19276836277424.781175635-853.839424952912-588.781175635382-0.575948862545888
20275216275496.58372056-1053.41932744088-280.583720559806-0.241500869741957
21274352274617.855766088-1020.95701995824-265.8557660879610.0393016841926683
22271311276030.215661518-568.683553263882-4719.215661518040.547625224235703
23289802282771.491607707788.9660761370447030.50839229351.64319917819594
24290726288213.5321325541650.382561782302512.467867446361.04636923700167
25292300289952.3119807751666.718039856192347.688019224490.0203784280270694
26278506281999.064691389-117.659049246313-3493.06469138926-2.15340139308426
27269826274836.563223571-1413.65069880534-5010.5632235706-1.54252059215159
28265861267760.870634804-2454.48893417320-1899.87063480361-1.26333867744152
29269034267809.600921741-1992.193840707731224.399078259360.562640557884551
30264176264112.236155732-2307.7632342798663.7638442678025-0.381999700049219
31255198257214.214674899-3157.17150710773-2016.21467489926-1.02625665260686
32253353253392.069538115-3280.18000254160-39.0695381152983-0.148704898086683
33246057248396.529836918-3597.46683497079-2339.5298369184-0.383840074575263
34235372243660.007073746-3808.10126249424-8288.00707374609-0.254844312051477
35258556248976.627828301-2122.705824813589579.372171699242.03989541260807
36260993255053.955971136-610.4699650815855939.044028864111.83962445629410
37254663251026.739372880-1241.295756003923636.26062712045-0.773380939517793
38250643250518.406034935-1105.81393404893124.5939650653880.163892018883985
39243422247728.116495114-1415.84137125016-4306.11649511423-0.371828651395445
40247105248640.464030903-988.115637813652-1535.464030902630.517745385301904
41248541247026.040000542-1103.448526477031514.95999945761-0.140257801685897
42245039244050.964668988-1448.79358272527988.035331012056-0.418794092280214
43237080239697.574284708-1984.906940721-2617.57428470779-0.648444263383376
44237085236437.658312311-2220.1657284884647.341687689025-0.284410628875452
45225554229952.287500718-3006.90280590260-4398.28750071783-0.95132373108318
46226839234617.804240254-1592.45202999503-7778.804240254071.71075555036107
47247934238924.679206512-505.9054165836619009.320793487991.31590710248393
48248333240707.601689204-84.5287031311757625.398310796420.512423869308125
49246969242740.200822058305.7245409595544228.799177941960.47562544061237
50245098244316.037711156539.957089869316781.9622888444380.283389732372138
51246263249456.1464426211386.20495140250-3193.146442621081.01866715220675
52255765255336.7120126022211.62675979135428.2879873977540.998333278051667
53264319260770.3616578642804.011659872183548.638342136410.719563361095417
54268347265434.1937287283146.489218633692912.806271271590.415612413075281
55273046272774.2237871663919.11985033031271.7762128338210.935383352977324
56273963273975.8789382593418.56586900893-12.8789382591303-0.605245222300388
57267430275523.3986993253074.09089325668-8093.3986993247-0.416427338040158
58271993280664.8429935173454.45798717111-8671.842993517230.460026571812748
59292710284483.8456402383521.48643465018226.154359761620.0812095325190694
60295881288632.0692575833636.734630811327248.930742417210.140042398042488
61293299290649.8679025383338.728748594212649.13209746249-0.362247822261644
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/1ojm01260128680.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/1ojm01260128680.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/2rqgf1260128680.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/2rqgf1260128680.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/3phjn1260128680.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/3phjn1260128680.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/47wh41260128680.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/47wh41260128680.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/52jf51260128680.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128724pv1txpb3h20remo/52jf51260128680.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