Home » date » 2009 » Dec » 04 »

ws9

*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 06:22:06 -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/t1259932996nu0sigrk436rk1m.htm/, Retrieved Fri, 04 Dec 2009 14:23: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/2009/Dec/04/t1259932996nu0sigrk436rk1m.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 «
5594 5585 5710 5511 5403 5826 5884 5965 5960 6064 6046 5954 5952 5960 5983 5996 6021 6094 6202 6276 6306 6342 6345 6328 6191 6261 6253 6198 6247 6293 6381 6448 6470 6516 6532 6526 6533 6498 6507 6464 6453 6468 6497 6808 6793 6907 6792 6757 6734 6654 6589 6469 6521 6448 6410 6528 6445 6458 6215 6167
 
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'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
155945594000
255855585.49267698426-0.465753823415763-0.492676984255414-0.0537199697662753
357105707.596294475910.205542337353012.403705524089651.28964252188643
455115515.60454454272-0.535805249445372-4.60454454272467-2.02202742407307
554035404.783537737-0.985150683927748-1.78353773699529-1.16024585017360
658265817.443839220640.6992994870306118.556160779356924.35168984027478
758845884.298174414510.967538038309447-0.2981744145103280.695967805368592
859655962.755417204131.280458299667422.244582795872970.815204911765328
959605959.274880243671.261309677064680.725119756329473-0.0500860864667244
1060646060.566153645121.662016516054003.433846354881511.05231571753898
1160466045.28596631541.594419068935140.714033684595423-0.178230683152004
1259545954.288744605051.22645718464851-0.288744605053132-0.974049435437869
1359525961.236225049070.986194715512836-9.23622504906980.072383046271056
1459605962.639147097250.9960390732434-2.639147097248860.00374972867586038
1559835976.486732922231.044301846171966.513267077765880.135025993182668
1659965994.440743670921.073320975605261.559256329079150.177714473876296
1760216026.553171143211.13311776747348-5.553171143214820.326200354141215
1860946084.09966477751.243952188273969.90033522249520.592866472567908
1962026199.96524336781.468616840929472.034756632193711.20459447496761
2062766271.747315644811.606116973431564.252684355184780.738944706054103
2163066306.390346838381.67058042811459-0.3903468383751450.347193814450709
2263426338.0828831811.729234926775363.91711681899740.315510013757201
2363456342.718894852961.735193664451372.281105147040670.0305514167643221
2463286328.633423022431.71369943878817-0.633423022430824-0.166196050529395
2561916230.441766995573.59369480458091-39.4417669955685-1.14783473088277
2662616260.533669043893.980624974386070.4663309561100440.254986689834194
2762536244.577663510163.911073235999128.42233648983997-0.209267911254642
2861986196.116879116493.849621668905961.88312088350807-0.550264578482982
2962476247.537826257793.91135978448179-0.5378262577934440.499796953269810
3062936282.599393073383.9540690430620110.40060692661820.327271254796888
3163816374.750842002784.075181825439716.249157997220210.926622703581974
3264486440.447333855674.159565487426507.552666144325240.64740753922439
3364706468.667069464734.192449586178881.332930535274240.25278118282265
3465166508.635708321264.24217561081557.364291678737490.375880638291721
3565326527.246371096634.263996060938624.75362890337300.150986058536011
3665266522.28370221544.260951237382983.71629778459344-0.096883414367614
3765336572.700539614933.72635669464867-39.70053961492980.512308066485386
3864986501.307529929042.95752963466136-3.30752992903744-0.744530542525842
3965076496.310605786672.9302866559312510.6893942133312-0.0834179412674633
4064646466.229853190752.89694415335629-2.22985319074863-0.346814813038366
4164536455.047990837962.88286459612969-2.04799083795864-0.147897197461411
4264686461.305924651912.886570308205526.694075348087490.0354545813052317
4364976492.718899642022.918272046776254.281100357983380.299665872298256
4468086786.51453578883.2403666217287421.48546421120573.05562332299539
4567936798.260415557723.24978847173702-5.260415557717930.0893492048566338
4669076896.636255383073.3598321146343810.36374461693120.99933593844963
4767926794.941374950073.22857920938627-2.94137495006802-1.10381319909111
4867576756.943928219253.239111566095290.05607178075444-0.43286267391238
4967346764.614148842453.20376185130339-30.6141488424510.0483050690153466
5066546662.828929106692.40088842459201-8.82892910668605-1.05808427627804
5165896581.283440980472.118003133684467.7165590195332-0.879588106515234
5264696476.260610292732.01146917010183-7.26061029273046-1.12560133546848
5365216518.343760902752.044925713647672.656239097255150.420925640267405
5464486445.216901805011.97432019780642.78309819499167-0.78961198318977
5564106421.840614078221.94981055578984-11.8406140782181-0.266285246180862
5665286501.978513967212.0252400039442326.02148603278530.821294854334814
5764456461.630308012421.984043332134-16.6303080124156-0.445097906525562
5864586444.848486386021.9644835155421413.1515136139800-0.197135550775057
5962156230.699746828621.73700106415493-15.6997468286192-2.27049373982922
6061676168.160618006341.77627109626637-1.16061800633696-0.674976602552073
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259932996nu0sigrk436rk1m/1g6oi1259932923.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259932996nu0sigrk436rk1m/1g6oi1259932923.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259932996nu0sigrk436rk1m/3844d1259932923.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259932996nu0sigrk436rk1m/3844d1259932923.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259932996nu0sigrk436rk1m/46nnx1259932923.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259932996nu0sigrk436rk1m/46nnx1259932923.ps (open in new window)


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