Home » date » 2010 » Dec » 19 »

*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, 19 Dec 2010 13:19:14 +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/19/t129276501049err4azk2i2fh6.htm/, Retrieved Sun, 19 Dec 2010 14:23: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/19/t129276501049err4azk2i2fh6.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 «
19876 45335 48674 156392 100837 101605 532850 294189 80763 105995 25045 90474 48481 50730 68694 207716 99132 104012 422632 364974 82687 66834 28408 97073 40284 24421 116346 72120 108751 91738 402216 390070 106045 110070 70668 167841 28607 95371 30605 131063 81214 85451 455196 454570 63114 74287 42350 113375
 
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'George Udny Yule' @ 72.249.76.132


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
11987619876000
24533523705.16254620475616.7522027315321629.83745379530.377795414304257
34867449924.222071934417299.1503055579-1250.222071934420.323492544118435
4156392118643.27734350541742.087828667537748.72265649520.789228636195483
5100837137795.31877983230205.5178236298-36958.3187798317-0.367820509206533
6101605126812.8696489009132.46928179208-25207.8696488998-0.613684411245519
7532850350459.558185676115664.421114603182390.4418143243.08504736453304
8294189406741.20027843786369.1058814291-112552.200278437-0.86135391283276
980763255397.689881801-31541.5340120403-174634.689881801-3.47143212212441
10105995118683.916325191-83889.6419868158-12688.9163251907-1.53680028047496
112504511682.2177423321-95400.309773368413362.7822576679-0.337692294788612
12904748578.67816380266-49443.883738307981895.32183619731.34858582023923
134848123850.8408790019-17460.910643838324630.15912099810.944181517057383
145073033836.8548505416-3814.1412204815916893.14514945840.407154962785429
156869463100.136042131612555.24614411095593.863957868440.478278592444982
16207716129052.84112570738285.189125976978663.15887429280.749381345869228
1799132177105.57867499142972.6437995942-77973.57867499070.139758478522345
18104012234895.57115229250175.1171322573-130883.5711522920.214131816162629
19422632227588.39683249522243.2365240479195043.603167505-0.817447379367588
20364974288810.07070324441023.698323716676163.92929675610.54820571136675
2182687258982.1939640137003.77461835468-176295.193964013-0.997398248842642
2266834148865.314897505-49297.108895649-82031.3148975048-1.65389196050231
232840863317.1809415257-66742.2166687941-34909.1809415257-0.512602849346666
249707319313.6236036491-55796.340114621477759.37639635090.321909185348457
25402844584.49418177875-36002.326565502235699.50581822120.582794387586316
26244219726.4336433907-16144.471316055514694.56635660930.58354973095151
2711634682780.067015545126748.607538146133565.93298445491.25454303229922
287212064702.0670171275351.533163592217417.93298287303-0.626322751446359
29108751134511.65198133336051.6728168491-25760.65198133330.904954280000311
3091738202486.60962477351322.9654287587-110748.6096247730.451251783733253
31402216238150.19578686943811.5559866347164065.804213131-0.220837457595763
32390070263383.39434911934925.1282819528126686.605650881-0.260040486045174
33106045245406.3917835669731.43421624283-139361.391783566-0.737320977478277
34110070199958.699285429-16491.9172303027-89888.6992854294-0.769511284026466
3570668139516.721833644-37387.9313008423-68848.7218336444-0.614610367114593
36167841103895.282026581-36546.603861935763945.71797341920.024767245211941
372860743906.6921714098-47729.6669201649-15299.6921714098-0.328866951263245
389537161223.7277646957-16706.291846559834147.27223530430.90989727424474
393060522335.55907111-27253.37102113778269.44092888999-0.308720577161575
4013106389285.719583352517368.770294277341777.28041664751.30787450927381
4181214132342.07234716029524.6514659624-51128.07234715960.357607747375734
4285451181030.37611563038614.2063266881-95579.37611563030.267861474738855
43455196252992.54074851954464.0991427527202203.4592514810.466046312004838
44454570302167.5614541351952.9794877709152402.438545870-0.0735885515555617
4563114245619.143715174606.416079718307-182505.143715174-1.50325370118597
4674287168819.180736287-35933.3515807221-94532.1807362867-1.07172166660501
4742350106500.037859408-48387.3759783597-64150.0378594085-0.366190189097005
4811337545956.1712552038-54134.701471767567418.8287447962-0.169149952581934
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/1w1xh1292764750.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/1w1xh1292764750.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/2w1xh1292764750.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/2w1xh1292764750.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/3psw11292764750.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/3psw11292764750.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/4psw11292764750.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/4psw11292764750.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/502wm1292764750.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t129276501049err4azk2i2fh6/502wm1292764750.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