Home » date » 2010 » Dec » 28 »

Paper: analyse (min18) STSM

*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, 28 Dec 2010 19:24:09 +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/28/t1293564119pxf8077ispsvx7c.htm/, Retrieved Tue, 28 Dec 2010 20:22:01 +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/28/t1293564119pxf8077ispsvx7c.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 «
3065 2997 2901 2815 2709 2711 3509 3369 3596 3448 3160 2934 2534 2266 2088 1932 1784 1851 2700 2580 2829 2298 2045 1824 1872 1801 1735 1639 1521 1758 2603 2540 3103 2801 2590 2324 2424 2288 2163 2082 1937 2155 2874 2836 3439 3278 3129 2959 3060 2898 2783 2632 2465 2689 3321 3359 4108 3407 3241 3013 3067 2965 2823 2718 2567 2658 3436 3375 3931 3371 3038
 
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
130653065000
229973008.52132984141-57.4308461652338-11.5213298414105-0.394571923099675
329012904.48245445651-92.0410946133205-3.482454456509-0.233214850986717
428152811.98042638843-92.40062911815433.01957361156934-0.00228395106446355
527092710.84711376416-99.0688472962668-1.84711376416367-0.0417410036872391
627112692.90041666764-37.112717630337718.0995833323590.390063775627983
735093360.9252125022502.450445333022148.0747874978043.39282560013221
833693494.63203290656220.254613650929-125.63203290656-1.77441480569011
935963598.04039785579130.84742838385-2.04039785578978-0.562189657734893
1034483492.23032542799-50.2163857782155-44.2303254279921-1.13851232294309
1131603198.12608032255-236.811707873242-38.1260803225456-1.17329512656562
1229342926.23880999051-263.6481050742927.76119000949463-0.168744903466494
1325342555.07420020928-345.745313209625-21.0742002092838-0.517493978489517
1422662254.63042018064-311.04258349015911.36957981936340.221450641719808
1520882062.4048966199-223.78038586020525.59510338009880.548037194003999
1619321885.12811360623-189.43627362702146.87188639377210.218798237261057
1717841768.46397035217-135.68042229851715.53602964782930.337110549454524
1818511949.3676426417196.8386750230845-98.36764264170811.4611662625695
1927002410.25787418582364.557413231091289.7421258141791.68429329247413
2025802728.76396020645330.663129715337-148.763960206453-0.213119576721193
2128292842.21808779584170.784291962522-13.2180877958423-1.00528997780698
2222982422.9319125651-263.520639190831-124.931912565101-2.73097136959565
2320452071.68499435855-328.076333395277-26.6849943585501-0.405921443073218
2418241770.94605818772-307.97529478701353.05394181227910.126419177550124
2518721813.71522837652-50.095109630941858.28477162348121.62591288219237
2618011812.27350932658-14.2792011961628-11.27350932658210.225515918419823
2717351715.18250347072-74.521735545023719.8174965292804-0.378270078091017
2816391588.69493438335-112.31913445952950.3050656166522-0.239052361931656
2915211559.68504954285-51.5234587913615-38.6850495428460.382337989611295
3017581890.44934070841226.430773552593-132.4493407084061.74536624628129
3126032312.76244695178368.780125196721290.2375530482240.89534009133089
3225402668.94970562274359.619627478365-128.949705622737-0.0576076578612994
3331032972.93319801753319.135257613662130.066801982469-0.254552555312155
3428012960.8509345405478.1318580864534-159.850934540542-1.51549629249334
3525902685.13473316619-179.230373665122-95.1347331661929-1.61825202014122
3623242385.92658635877-266.434699894323-61.9265863587737-0.548616955098713
3724242327.87996012428-114.87443127559996.12003987572120.954707986502277
3822882257.33172597887-82.648765377334530.66827402112520.202594005573066
3921632112.02825671909-127.94694167986650.9717432809054-0.284613928451145
4020822020.28549144245-101.78265886141961.71450855755110.164995401597328
4119372046.81273470064-8.81664598509114-109.8127347006450.585039709485024
4221552295.95177730898177.766692944792-140.9517773089841.17196428997283
4328742589.36348269849261.323175068105284.6365173015090.525344853228414
4428362958.82413658518339.505870376773-122.8241365851790.491677046270253
4534393246.73503793894302.186193739311192.264962061064-0.23465905208662
4632783374.02365686944175.682184238808-96.0236568694404-0.795461686634786
4731293252.48431823018-39.2108882243069-123.484318230177-1.35127280967065
4829593100.15180750171-120.974293569908-141.151807501715-0.514423801137036
4930602972.14054452987-126.06364528980187.8594554701331-0.0320345741624389
5028982836.12378596156-133.25651550525861.8762140384404-0.0452095736285125
5127832714.89932819909-124.58929362607268.10067180090580.0544746343218403
5226322588.12644875065-126.161779417943.8735512493452-0.00990411744538079
5324652604.05022701716-23.6573808605812-139.0502270171590.645074161407301
5426892816.61139198726146.643517767402-127.6113919872591.07011712518994
5533213066.03864354455220.667824554741254.9613564554450.465318489748285
5633593453.71793609093340.978920306346-94.71793609093440.756556254003159
5741083868.98620739569394.518085458683239.0137926043140.336652662732684
5834073582.58900433025-96.2147637535746-175.589004330245-3.08569895407298
5932413349.92228909767-194.527004960755-108.922289097669-0.618238700894315
6030133156.33281984418-193.851538820364-143.332819844180.00424951123704307
6130672970.52202683791-188.05592264861496.47797316209210.0364631942862495
6229652868.42829301131-126.14496135982596.57170698869260.389131298758314
6328232733.38062645764-132.54338269666289.619373542362-0.0402215478615863
6427182676.60491289207-78.098927734114541.39508710792590.342707534470107
6525672733.2929907460118.878087622085-166.292990746010.610223872428589
6626582814.4711792292463.6936816447249-156.4711792292370.281689107048199
6734363195.8435886772292.023865959307240.1564113227981.43521013520164
6833753513.49534691749310.443191405403-138.4953469174890.115816452023226
6939313562.46723760569122.461057320644368.532762394312-1.1820397174037
7033713535.7279551683815.1900677394097-164.727955168382-0.674528766231616
7130383219.50169645456-223.055421458684-181.501696454564-1.49829686584636
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/1o0mz1293564245.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/1o0mz1293564245.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/2o0mz1293564245.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/2o0mz1293564245.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/3zrm21293564245.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/3zrm21293564245.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/4ailn1293564245.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/4ailn1293564245.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/5ailn1293564245.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293564119pxf8077ispsvx7c/5ailn1293564245.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