Home » date » 2010 » Dec » 08 »

*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: Wed, 08 Dec 2010 15:36:36 +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/08/t1291823326wfggamqjz75l0z7.htm/, Retrieved Wed, 08 Dec 2010 16:48:48 +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/08/t1291823326wfggamqjz75l0z7.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 «
9700 9081 9084 9743 8587 9731 9563 9998 9437 10038 9918 9252 9737 9035 9133 9487 8700 9627 8947 9283 8829 9947 9628 9318 9605 8640 9214 9567 8547 9185 9470 9123 9278 10170 9434 9655 9429 8739 9552 9687 9019 9672 9206 9069 9788 10312 10105 9863 9656 9295 9946 9701 9049 10190 9706 9765 9893 9994 10433 10073 10112 9266 9820 10097 9115 10411 9678 10408 10153 10368 10581 10597 10680 9738 9556
 
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
197009700000
290819420.75450143316-4.57323719029182-334.807899115417-1.94834013632446
390849148.23690533508-22.2229146322506-61.4760003105638-1.35940558228141
497439343.3410893296-8.81350400055626396.8025127559631.35792880524648
585879095.71792616632-19.3898286098834-504.931356723109-1.70068400570002
697319271.8098096163-13.6789709574988455.8751655862041.44995580907109
795639434.3419938712-10.0335857183998125.6125544010451.31903750930236
899989698.05321184868-5.3287449179581295.195070007962.05149393903093
994379674.89339629866-5.61986801785221-237.5839449585-0.133514733832356
10100389807.9599625221-3.34218991531362227.6365196976751.03724816845382
1199189889.1118146233-1.9365078703504827.42554736427880.6314277490997
1292529667.92152658138-5.59569782119897-412.128213795466-1.63791142714891
1397379552.09646360713-3.60297502605207186.867956364579-0.867993514739218
1490359409.60408920573-2.67806138231115-372.145429557391-1.07958564974153
1591339311.8670562481-4.16396481957125-177.363252235036-0.67266590846052
1694879154.7049266868-8.33657128828147334.584414763756-1.05065058009594
1787009193.58255742851-6.97670755254194-494.306170224580.333375757119034
1896279253.45661914782-5.30619486369144372.477365362720.487314530858606
1989479171.22218329847-6.8489039452291-222.963887319412-0.570816284511288
2092839097.5437699252-7.92764326966444186.562643494913-0.499537504676475
2188299104.99880734835-7.72006152946614-276.2547673069470.115256870510946
2299479330.401327745-5.08068646725834612.711965117631.74690752842199
2396289424.0075377992-4.23375213024213202.3451698412920.739029481362515
2493189518.233353789-3.76373048259059-201.8812643851330.738235804272518
2596059459.67914841382-3.82810473375604146.243003672187-0.412983398291401
2686409244.05520062057-4.5614664474363-600.521714378761-1.58335108754847
2792149214.62719890013-4.81019516280528-0.22464114649487-0.181371770740218
2895679224.516761558-4.57400113307158342.2514175185350.105411069767361
2985479155.49379595095-5.80539090009781-607.480281767522-0.463548212929267
3091858982.94359899634-8.98969150139358204.715084781184-1.21612242545158
3194709195.95005020216-5.17614871686062270.4524616261721.64058433173774
3291239183.67764068775-5.27922954825366-60.5613089813522-0.0528669508714306
3392789382.19726346708-2.87328272037568-107.5597203617461.5236769346327
34101709524.09469487191-1.54036934419529643.5094489717251.08334525580578
3594349459.83031998424-1.96703685693058-24.7907015091494-0.469402423735074
3696559554.2111387519-1.4917666453109799.19044662038230.721117644780371
3794299426.44024351576-2.041437435279764.65246249873495-0.94390669372978
3887399354.04484078152-2.44741155897752-613.887181820166-0.52257735361842
3995529400.49104181577-2.02045921379527150.7150491745590.359346060548004
4096879364.46944021814-2.42468218856774323.075912981341-0.247865446690069
4190199439.2406026585-1.34112591070702-421.4739697943410.562504440206011
4296729526.31204832682-0.0428513508651429144.2684352673980.64814736397209
4392069354.37026517756-2.44559839392539-145.585843110317-1.2701001625453
4490699291.78863492691-3.18985192897205-221.806596474209-0.4470367361601
4597889527.2691993719-0.71589068617328256.8116731520041.78023707522975
46103129624.420828054410.100170390095405685.9671427460080.730999398129028
47101059836.120689942421.50193541449598265.3887170124081.58105311970829
4898639824.442724642681.4287332885863138.7747351140736-0.0984385370787065
4996569747.286481104871.00259473583613-89.9922998100579-0.585806296407066
5092959801.813267634571.34088482098732-507.690421639760.397302840410875
5199469816.202555516311.44476309446794129.5851444434310.0963122419887453
5297019677.003169722740.071461330048208726.270297346684-1.0336560688549
5390499569.03808422818-1.13203119590869-518.296349569519-0.793453922902278
54101909686.253809155680.255628143352628501.8345363654090.87166070665636
5597069795.083719329021.49968239644785-90.84590128563270.803256547155335
5697659964.84954253423.26806929279488-202.5947919059871.24994318954811
5798939928.37941113472.90356737883564-34.728420318324-0.295988750252327
5899949736.873560646941.39315731484946260.319591394797-1.45005227890209
59104339841.169848452442.07211549502545590.1377809939640.76785759012792
60100739924.92310693692.55428630773501146.7335003562740.609236964687423
611011210052.79970588893.2849971043270657.14225588673830.93330041507913
6292669964.623489790442.70209668546316-697.126316059047-0.67926581475193
6398209805.683571711381.5149502103494216.9512711711893-1.19658207327127
64100979863.912843145641.99306605262294232.166121683320.418809574824304
6591159841.341541796061.76455060490202-725.94329780538-0.181296573386226
66104119901.661191521872.33417542623351508.3887166237480.432784215057325
6796789895.09581224162.24852864652447-216.951027647743-0.0659462390872501
681040810131.5185574884.36911179243316272.6593023026991.73978933267392
691015310180.0046373444.73063532414807-27.72676481396870.328412380568315
701036810200.93838039144.84828292513222166.795868154950.120757261637749
711058110156.26751075264.52786575459365425.545517013987-0.369203429549534
721059710266.97906426625.16437023326159328.2774799771410.791437348961157
731068010388.57659975195.85381681877687289.5136304602470.866899581061993
74973810404.39924446935.91598737040549-666.5624232906760.0740933883024219
75955610104.99441281393.83319949892939-544.009399803566-2.26486452572958
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/1xbig1291822592.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/1xbig1291822592.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/2qk0j1291822592.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/2qk0j1291822592.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/30tzm1291822592.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/30tzm1291822592.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/40tzm1291822592.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291823326wfggamqjz75l0z7/40tzm1291822592.ps (open in new window)


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