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 17:18:58 +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/t1292778991v2a5c5vetudhjhp.htm/, Retrieved Sun, 19 Dec 2010 18:16:33 +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/t1292778991v2a5c5vetudhjhp.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 «
41,85 41,75 41,75 41,75 41,58 41,61 41,42 41,37 41,37 41,33 41,37 41,34 41,33 41,29 41,29 41,27 41,04 40,90 40,89 40,72 40,72 40,58 40,24 40,07 40,12 40,10 40,10 40,08 40,06 39,99 40,05 39,66 39,66 39,67 39,56 39,64 39,73 39,70 39,70 39,68 39,76 40,00 39,96 40,01 40,01 40,01 40,00 39,91 39,86 39,79 39,79 39,80 39,64 39,55 39,36 39,28
 
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
141.8541.85000
241.7541.7562066210638-0.0065553124913993-0.00511075876723255-0.61157554965322
341.7541.7549293310928-0.00611880030325368-0.005092385647052910.05512048631084
441.7541.7549006548992-0.00542960596175323-0.005082230338609890.0623942577348153
541.5841.5899273756818-0.0272834162103662-0.00530433967981116-1.61054141317511
641.6141.6137934117889-0.0193904508997543-0.005244285699380850.51065660381463
741.4241.4299975197799-0.0467618215237257-0.00540492067399878-1.62835288439185
841.3741.3756214929032-0.0480930062245208-0.00541105014653086-0.0749965969536968
941.3741.3741024961183-0.0396888198675224-0.005380370494667770.456988108410448
1041.3341.3353541870175-0.0395155883299458-0.005379865842364360.00920458601168563
1141.3741.3732397749297-0.0250679142824497-0.005346138620504660.756197181506416
1241.3441.3454217860621-0.0255857061126666-0.00534710983358388-0.0268366330650689
1341.3341.2866304499283-0.03153495499449410.0442367032332191-0.379472745287853
1441.2941.2924523769974-0.0245981513681806-0.003162620736352680.30718206069518
1541.2941.2924932016727-0.0199060513396933-0.003160166363942460.240024650589459
1641.2741.2731453597386-0.0197995537619999-0.00316045268084340.00543303450087765
1741.0441.0486067124392-0.0588955580630466-0.00307166391677844-1.99266394346721
1840.940.9053233476935-0.07501943528306-0.00304205230068141-0.821335942029
1940.8940.8914075502777-0.0633397589181768-0.003059369768267370.594729161605545
2040.7240.7258005645861-0.0828929751436773-0.00303596358724405-0.995406373780797
2140.7240.7209408838964-0.0679704515706822-0.003050385752733460.759548032383008
2240.5840.584880935154-0.0809930601853865-0.0030402238764905-0.662774533557788
2340.2440.2498765743218-0.12957887687454-0.00300961263811978-2.47256603372478
2440.0740.074250005569-0.138387163676504-0.00300513175741117-0.448240041566728
2540.1240.0580117723527-0.1153781816352990.05875190710973281.29182115715795
2640.140.0995831856281-0.0859718846523846-0.003017419164492471.38099087616352
2740.140.1006658976651-0.069316744924702-0.003019514498752030.847468612686639
2840.0840.0816799407282-0.0596852524074713-0.003039954208006410.48973876224505
2940.0640.0619731689419-0.0520358959661575-0.003053566940322280.389041153149987
3039.9939.9934934700151-0.0551819318808214-0.0030490392240099-0.160032460579175
3140.0540.0500535702964-0.0338043730721001-0.003073883922201291.08755401532798
3239.6639.672309155526-0.0996027090958257-0.00301213673390254-3.34764306168403
3339.6639.6606476456903-0.082779016086571-0.003024884786200990.85598491682344
3439.6739.6705307872641-0.06505216507212-0.0030357308148510.901965164401479
3539.5639.5641491185908-0.0729587950225451-0.00303182470087589-0.40230767202018
3639.6439.6390459238431-0.0446727744001233-0.003043108054385491.43927720668671
3739.7339.6820643601204-0.02805673728091250.04559630154021110.90311589298975
3839.739.7024882658352-0.0189263548958714-0.003614267547593970.438957996625694
3939.739.7030868391148-0.0151907805904221-0.003614714122722840.190072979452948
4039.6839.6837261335673-0.0159887224179164-0.00361344086647369-0.0405798182735179
4139.7639.7611136180570.00187739870114834-0.003637335009496570.908756363295003
424039.99735118725040.0467155761240067-0.003685829012782982.28098674910422
4339.9639.96578869260010.031739844058584-0.00367274976794332-0.761904628319648
4440.0140.01324988638580.034747512134722-0.003674870802533030.153026648064286
4540.0140.01457475201730.0283534337762807-0.00367122986019488-0.32533527697936
4640.0140.01443890157280.0229031579474176-0.00366872392676351-0.27732060894897
474040.00455283515550.0166302431348601-0.00366639511793735-0.319183088499056
4839.9139.9164907405033-0.00339856641637932-0.00366039124057445-1.01913112631678
4939.8639.8304526815677-0.01909659704538490.0317594691201597-0.83955993266865
5039.7939.7934720734949-0.022475658488028-0.0030426351700077-0.164529041217416
5139.7939.7924626686976-0.0183686811146941-0.003043031880386160.20897249038329
5239.839.8022878726012-0.0129738145812875-0.003049881582384950.274390633366302
5339.6439.6468710139236-0.0402276741106775-0.00302088063079823-1.38636948088415
5439.5539.5544238270231-0.0502183701235838-0.00301228352088342-0.508267825735278
5539.3639.3667107916579-0.0765232218571488-0.00299400490547728-1.33832870702638
5639.2839.2831826190994-0.0778633576636562-0.00299325297617586-0.06818602114093
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778991v2a5c5vetudhjhp/1arn21292779133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778991v2a5c5vetudhjhp/1arn21292779133.ps (open in new window)


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


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


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


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