Home » date » 2009 » Dec » 04 »

*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: Fri, 04 Dec 2009 12:52:00 -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/04/t1259956352pis7buhicijylj3.htm/, Retrieved Fri, 04 Dec 2009 20:52:39 +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/04/t1259956352pis7buhicijylj3.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 «
5560 3922 3759 4138 4634 3996 4308 4143 4429 5219 4929 5755 5592 4163 4962 5208 4755 4491 5732 5731 5040 6102 4904 5369 5578 4619 4731 5011 5299 4146 4625 4736 4219 5116 4205 4121 5103 4300 4578 3809 5526 4247 3830 4394 4826 4409 4569 4106 4794 3914 3793 4405 4022 4100 4788 3163 3585 3903 4178 3863 4187
 
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
155605560000
239224714.52536816824-74.8634167326895-89.9284610409174-2.64728315184995
337594251.25320949742-98.5977753216762-102.876743216874-1.39053745032720
441384188.74279278889-97.0069197894164-90.26264060110740.137511978806211
546344380.81362343875-87.0091017883324-76.23446919438391.13290461723728
639964201.35777485845-89.7106788592938-97.9182549126208-0.367345084406422
743084238.67637505286-86.3952112705153-79.84136254659930.508426254575097
841434187.54215009020-85.5422029361742-86.18484670181730.141690422389103
944294285.76819498042-81.3255527105868-74.51690030095580.740123624362006
1052194692.91651253572-70.547019462021-53.89808409926941.97003266688826
1149294793.51145861073-66.8859877586515-67.98960157876310.690838602016055
1257555214.38773771925-56.7225666989548-39.87521559338681.97015700851266
1355925103.99086011032-51.4016152985969561.767991861081-0.291046803469919
1441634639.17502904271-66.4555273969757-93.6842778615573-1.39183123962552
1549624780.64246390558-60.7121546520551-40.02072821445150.779006773947029
1652084968.63601110879-55.64365659185-43.21993081348340.977524372560877
1747554864.98092556559-56.4226911816121-54.0020853803743-0.192305125451883
1844914697.80001516939-57.9616464948569-76.1980432749851-0.44726681858055
1957325140.71339328842-51.6659919258776-2.506212637543362.03044740077155
2057315402.4316535147-47.9698406767004-43.97328344422451.2728758015702
2150405244.57404946423-49.2138586451292-73.7482507358397-0.446799765869881
2261025607.40780423478-44.67574253910483.613446543748451.67636959726186
2349045305.69961264877-47.4493417860724-95.2663634307702-1.04609018511708
2453695316.26047711632-46.8725599245558-16.50473000998430.236197409956976
2555785190.95106719817-43.3708694523649487.488997458091-0.369495435030959
2646194940.27152490031-48.0404573935925-108.026538709054-0.758011313040461
2747314833.81936967272-49.1228078632079-38.5477608553221-0.225524952249835
2850114897.7796499059-47.5652056304162-16.59961549983350.45062433377211
2952995064.96142435806-45.2109195561946-16.85622027406890.866840707514142
3041464682.33196206863-48.3802891034652-139.080584198232-1.36962201276624
3146254630.15616070899-48.4126010086433-0.671334903417502-0.0154467698685278
3247364665.29227494143-47.7432752249101-28.19635040705190.340469035235951
3342194487.00660858808-48.7506075698078-113.320023689104-0.532344429826461
3451164724.32664662977-46.594778529881752.50577378053621.16703873175352
3542054520.63978480779-47.7541620852386-129.319074725491-0.64102463004397
3641214322.45584247464-48.6630819708016-22.7167990088788-0.614191306034067
3751034375.38349007507-51.4588144426713601.1161495134490.455041151048605
3843004363.20855680689-50.8410477668242-105.4525041503620.149202273962471
3945784452.50165860099-48.846116918933-30.50418473367470.548586931057211
4038094162.49598431055-51.4345106351338-76.3579461194893-0.96694442769165
4155264716.95404162376-46.2668391848404103.0092405509412.45436570254497
4242474560.84837304883-47.067647194155-185.071471102264-0.446916100740273
4338304219.38359932978-49.0117038349573-43.2350544981382-1.20033228477782
4443944268.43168519634-48.401891792547710.10477781280820.400226999998593
4548264540.35518764070-46.4798995198423-91.81861190707371.30810653137723
4644094437.28757644325-46.812034241452738.4224059681007-0.231157256891856
4745694516.67373846962-46.0934944827857-96.50201326584250.515622131797038
4841064329.46848593743-46.6531423624850-56.6796654507778-0.577006050046973
4947944263.10149939684-46.2791764892355555.031501887875-0.0859867005905898
5039144133.08375826453-47.2578845637882-126.904658667729-0.325073995661583
5137933959.75336934837-48.7324425406275-25.6541132832324-0.497573358930957
5244054175.79066231665-46.3469022758127-74.66601959863051.06523695834722
5340224040.99819793884-46.980026775036883.7232868883203-0.358975354620323
5441004105.32382236895-46.3012438720444-135.2786296798640.453493531451737
5547884395.02809415939-44.4489142184709-0.2994513942038211.37142306411808
5631633857.74409924823-47.0069640074485-117.208703688729-2.01329649051822
5735853739.52766194971-47.363889049679-71.0265917147828-0.291034305330591
5839033768.21924941065-46.991134243994145.56432836711170.31092234596646
5941783954.63528394172-45.9023364173876-50.55068995728230.954387983747836
6038633918.67657334485-45.8756445812152-67.37527137364520.0406995181224796
6141873774.58962180998-44.5205207416207531.193417256676-0.421350377293246
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/1it331259956318.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/1it331259956318.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/2kqav1259956318.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/2kqav1259956318.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/34vg01259956318.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/34vg01259956318.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/467rk1259956318.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/467rk1259956318.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/5k01s1259956318.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956352pis7buhicijylj3/5k01s1259956318.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