Home » date » 2010 » Dec » 28 »

*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 13:13:55 +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/t1293541937kyuan9v4xe3tzma.htm/, Retrieved Tue, 28 Dec 2010 14:12:23 +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/t1293541937kyuan9v4xe3tzma.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 «
11100 8962 9173 8738 8459 8078 8411 8291 7810 8616 8312 9692 9911 8915 9452 9112 8472 8230 8384 8625 8221 8649 8625 10443 10357 8586 8892 8329 8101 7922 8120 7838 7735 8406 8209 9451 10041 9411 10405 8467 8464 8102 7627 7513 7510 8291 8064 9383 9706 8579 9474 8318 8213 8059 9111 7708 7680 8014 8007 8718 9486 9113 9025 8476 7952 7759 7835 7600 7651 8319 8812 8630
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
11110011100000
289629151.72898761441-104.281203113550-189.728987614411-2.68274837761497
391739190.9413920235-101.309899504965-17.94139202349130.316778501194152
487388888.55337711984-102.674843178230-150.553377119834-0.451974962980000
584598586.6089699495-103.886921897370-127.608969949502-0.447458380772994
680788219.34120612973-105.733076635293-141.341206129734-0.591161030112538
784118434.16741232283-103.314927392172-23.16741232283280.719302187539148
882918401.90493558974-102.754022722746-110.9049355897390.159395276188719
978107980.19213107548-105.376775530318-170.192131075485-0.715355766783798
1086168562.73036354003-99.493474754110153.26963645996971.54245675938534
1183128460.45087107921-99.5182102277705-148.450871079213-0.00624530494248919
1296929557.1484360474-88.514551649736134.85156395262.68084656957212
1399119113.96672378358-76.7994245984491797.033276216421-0.919360846580055
1489159109.20202891533-75.2251798631519-194.2020289153330.145083276654696
1594529337.53669264368-69.1343924460746114.4633073563170.659337041965563
1691129234.07569008787-69.5302244463971-122.075690087868-0.0767851238858974
1784728660.21318058797-73.9893549109773-188.213180587970-1.12817793128366
1882308404.86681407355-75.628650278673-174.866814073548-0.40543942166794
1983848361.5458015267-75.317582613238122.45419847330260.0722001140783568
2086258564.59958136614-72.519410809757360.40041863386260.621935553147393
2182218483.61934737145-72.6075162992987-262.619347371449-0.0188996594712316
2286498519.85483161535-71.4235586633613129.1451683846530.243132176382376
2386258846.30200897733-67.0441574738951-221.3020089773260.88863371537594
24104439950.45750632936-58.0669409318259492.5424936706442.61269391652336
25103579755.94502339968-57.6157652759494601.054976600317-0.319682585933325
2685869043.11340159796-68.1491857694916-457.113401597957-1.40566599353232
2788928787.63343182715-71.7921065819403104.366568172847-0.406621488505043
2883298415.52770945267-76.391180753812-86.5277094526656-0.668276694427434
2981018250.08376887579-77.5146815861799-149.083768875786-0.198626920172358
3079228113.14588868574-78.2347955760516-191.145888685738-0.132452643989060
3181208123.30661178185-77.1347604154134-3.306611781849950.19695452312405
3278387832.56967320268-79.88439870284025.43032679732221-0.475823842526044
3377357934.18687690408-77.4732991319601-199.1868769040820.404301991209434
3484068262.37407626163-71.9652576441052143.6259237383730.903678995519527
3582098611.01529122724-66.4992369929473-402.0152912272350.936179492796282
3694518868.11091851488-63.2189464894811582.8890814851180.720963365134581
37100419171.82486683474-60.5965809706119869.1751331652640.833591909929539
3894119683.79890340546-51.567563719338-272.7989034054551.25094095754972
391040510131.9933495994-41.9866910267261273.0066504006441.08875246509051
4084678930.00138421515-62.2764631385297-463.00138421515-2.57097838718554
4184648618.65355396426-66.13527352608-154.653553964258-0.554155910825658
4281028339.82981390013-69.2711024083718-237.829813900126-0.472992881457897
4376277714.38106856821-77.5052380006069-87.381068568208-1.23640009085819
4475137529.72498707655-79.126532537786-16.7249870765458-0.238168978437048
4575107700.8360475885-75.2596348821626-190.8360475884990.556232192170052
4682918099.9160536253-67.9098220517655191.0839463746981.05417898954564
4780648441.9220032502-61.8751923264924-377.9220032501970.910033593969813
4893838800.75567517234-56.4331952858063582.2443248276660.936007505351328
4997068962.06326211932-53.7429832952189743.9367378806760.488438298476534
5085798958.93294881637-52.8983121990589-379.9329488163680.111257269410033
5194748936.91312924544-52.3055326122391537.0868707545640.067514515523591
5283188771.65122495816-54.4145700850778-453.651224958157-0.249736022575718
5382138400.3799976768-59.9217041076765-187.379997676795-0.703551818199042
5480598182.9560451612-62.5471008494056-123.956045161200-0.349681683346025
5591118905.5801382149-49.5374864440732205.4198617851041.74257223952062
5677088062.46282412428-62.8298759849634-354.462824124275-1.76108273650325
5776807956.00680391426-63.568281476183-276.006803914258-0.0968115418605098
5880147911.39102277594-63.2495728139162102.6089772240570.0420393212950883
5980078334.51155727326-55.3951367432464-327.5115572732571.07794649720128
6087188228.53498395817-56.1616933126726489.465016041829-0.112371212684350
6194868617.06919247476-49.3691976811174868.930807525240.991526312624052
6291139302.61886165224-36.394369808097-189.6188616522441.61931213306789
6390258678.00836231039-47.7749399612975346.991637689614-1.28965873073105
6484768788.0940840587-44.7282264609761-312.0940840587010.348560649514962
6579528285.38691990558-53.2137004178575-333.386919905575-1.01536218088255
6677598076.97262358745-56.0011076572134-317.97262358745-0.34416894824201
6778357565.13164355554-64.1103387548892269.868356444461-1.01050523680481
6876007810.25504172191-58.5917565057631-210.2550417219130.685424121090115
6976517898.11225963858-55.9704938546256-247.1122596385850.324561289303625
7083198212.67893060137-49.3998365121464106.3210693986300.820716058692524
7188128922.78923421093-36.304294691432-110.7892342109261.68151954564564
7286308450.52906552328-43.5947036012835179.470934476718-0.967323186872627
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293541937kyuan9v4xe3tzma/1ivcp1293542031.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293541937kyuan9v4xe3tzma/1ivcp1293542031.ps (open in new window)


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


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


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


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