Home » date » 2009 » Dec » 04 »

WS9 Populaire technieken

*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 07:17:26 -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/t1259936291iwqesmwqcgd8cwo.htm/, Retrieved Fri, 04 Dec 2009 15:18:19 +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/t1259936291iwqesmwqcgd8cwo.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 «
7.1 6.9 6.8 7.5 7.6 7.8 8.0 8.1 8.2 8.3 8.2 8.0 7.9 7.6 7.6 8.3 8.4 8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8.0 8.2 8.1 8.1 8.0 7.9 7.9 8.0 8.0 7.9 8.0 7.7 7.2 7.5 7.3 7.0 7.0 7.0 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9 7.7 8.0 8.0 7.7 7.3 7.4 8.1 8.3 8.2
 
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
17.17.1000
26.96.90727003089972-0.193330798072277-0.00727003089972077-0.704226735768314
36.86.78850306280179-0.1254920509469390.01149693719820980.252756347173876
47.57.445910837956520.5830435119152960.05408916204348312.52588990561095
57.67.64283226815070.234136871314490-0.0428322681506953-1.24908457651851
67.87.798317766381860.1630069204262510.00168223361814192-0.254542711717144
787.996040117205550.1944031610634870.00395988279444670.112354031319325
88.18.106747052270730.118713362298507-0.00674705227072498-0.270861433124373
98.28.200261034895640.0959246813346164-0.00026103489563794-0.0815509497598487
108.38.29933943425410.09877671400416890.000660565745904740.0102062058851642
118.28.21342016981819-0.0682513346322619-0.0134201698181885-0.597721993050808
1288.00650145456995-0.193653803787009-0.0065014545699481-0.44876183614508
137.97.89147459508063-0.1225955200728380.00852540491936850.254523475645755
147.67.59217121082318-0.2825369629461790.0078287891768185-0.577275216605326
157.67.641824169175160.00596598444299717-0.0418241691751611.04483237081638
168.38.166555258066360.4597823937954230.1334447419336411.62336816872578
178.48.459652197705580.314615543694299-0.0596521977055777-0.519354045982309
188.48.436127409441270.0198809399027283-0.0361274094412692-1.05486589780462
198.48.38716986626877-0.04013387062778770.0128301337312255-0.214765078397047
208.48.395760813502220.002343814893261670.004239186497784330.152009931540260
218.68.590818178772290.1703419207717620.009181821227711180.601193315489384
228.98.878516763115190.2726486136832210.02148323688481410.366112006440112
238.88.831832584746-0.00574093890677252-0.0318325847460061-0.99624165140994
248.38.36200481191443-0.410263807497274-0.0620048119144279-1.44762769201956
257.57.4932303197456-0.8097401699501170.00676968025439419-1.43130618328905
267.27.15511012989834-0.3983270058724720.04488987010166361.47498680004554
277.47.455831143138960.201888958538703-0.05583114313895862.15555527228033
288.88.580391196286020.9980894105562520.2196088037139782.85296047944670
299.39.355775717618050.806473459701432-0.0557757176180474-0.685193450912207
309.39.399366186745910.150037179689955-0.099366186745913-2.34951319211936
318.78.74806931594868-0.539751201203634-0.0480693159486781-2.46844625115379
328.28.19999718750983-0.5469139704648482.81249016968841e-06-0.025632464797672
338.38.25928087668654-0.02510968227789610.04071912331345591.86731544749477
348.58.45412535718340.1642243490658130.04587464281659900.677547023955088
358.68.601614115097250.149818621850856-0.00161411509725253-0.051552241481579
368.58.50057399688722-0.0660559400168866-0.00057399688721909-0.772568313369397
378.28.2246425368067-0.246655836751749-0.0246425368067008-0.647074252099913
388.18.09442967950603-0.1464468777309860.005570320493973730.358638820560745
397.98.09142844421346-0.0238997809579522-0.1914284442134590.439135973489429
408.68.374546918020180.239146391862270.2254530819798150.942689687612276
418.78.685847690929420.3008821467106180.01415230907057950.220765088877582
428.78.705697246243420.0605463043947875-0.00569724624342114-0.860125487706866
438.58.53430383931603-0.137888066608808-0.0343038393160259-0.71013274749021
448.48.46329550245308-0.0806649634861769-0.0632955024530750.204775138201458
458.58.483686987877870.005799140972799040.01631301212212900.309418719666709
468.78.652678415364390.1454260812981320.04732158463561030.499669444396183
478.78.688248651263320.05144021075955540.0117513487366797-0.336333862244121
488.68.579968496711-0.08516484685103070.0200315032890044-0.488923484234839
498.58.52374288160539-0.0604079103247379-0.02374288160538930.0886787778566803
508.38.31311180350983-0.188854972835606-0.0131118035098312-0.459524459102798
5188.22776220341937-0.100708917528796-0.2277622034193650.315642902356651
528.28.01447943356547-0.1967447561313820.185520566434526-0.344087289326769
538.18.03298858416205-0.01320149233080790.06701141583794630.656468788902478
548.18.062551056613350.02323684527146250.03744894338664470.130392330938489
5588.03970540050667-0.0160420623676027-0.0397054005066689-0.140570424063523
567.97.97802831168556-0.0549450064838047-0.0780283116855602-0.139215456420619
577.97.91615239554774-0.0608535176785578-0.0161523955477431-0.0211441138149328
5887.935451980602080.007474677018085950.06454801939792460.244520744789192
5987.965200681675080.02646019224692660.03479931832491600.0679404175326343
607.97.89872396132192-0.05273550784369370.00127603867807973-0.283469326265611
6187.986233490518950.06681216363730340.01376650948104530.428103429163364
627.77.75631952395923-0.185943521580317-0.0563195239592275-0.904194443637885
637.27.41481367387593-0.318120961263392-0.214813673875928-0.473185742016671
647.57.32354846566041-0.1251480998706720.1764515343395890.6912281262927
657.37.23829098133275-0.0912170449343760.06170901866725050.121381259628967
6676.97357700991644-0.2386883939937440.0264229900835601-0.527675275800038
6777.00535343574502-0.00874736864003431-0.005353435745017850.822912848967152
6877.06692774344010.051048683953149-0.06692774344009670.213983038118568
697.27.217768904319960.135906561874758-0.01776890431995470.303671323684131
707.37.250714200250480.04835683807814570.049285799749519-0.313307336039727
717.17.07611430569738-0.1411959115502970.0238856943026192-0.678325316143238
726.86.8441745721063-0.218330676964357-0.0441745721063067-0.276101577646014
736.46.3681186017649-0.4374719300729820.0318813982351018-0.784590556971931
746.16.10687663620297-0.287734886356914-0.006876636202966030.535674493546359
756.56.66952061297330.433565869984015-0.1695206129732992.58186942735932
767.77.490873663622270.7627527253243440.2091263363777331.17890596097675
777.97.836394801398020.4085167131604040.063605198601978-1.26737687852553
787.57.57333104585269-0.161303494489143-0.0733310458526862-2.03882164460811
796.96.96011983928894-0.544773139016027-0.060119839288939-1.37234651814663
806.66.66851579883087-0.329902993657074-0.06851579883087180.768927974988306
816.96.864719134688830.1166335350037330.03528086531116631.59796866010482
827.77.569286918977110.6156269839168920.1307130810228871.78570242190926
8387.981834958099320.443299261839280.0181650419006784-0.616691422072169
8488.013398969125460.0939464808181325-0.0133989691254577-1.25050214367421
857.77.69547686589742-0.2556097001249280.00452313410258257-1.25133186123122
867.37.43848397623087-0.256782819675197-0.138483976230873-0.00419692932001889
877.47.625319419925960.118993667319690-0.2253194199259611.34498147436459
888.17.854090506031190.2120374502520550.2459094939688110.333163348864071
898.38.134005948128430.2695822632922630.1659940518715690.205901647277511
908.28.19550387025570.09326823851490480.00449612974429121-0.630844684103213
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/16s5s1259936244.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/16s5s1259936244.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/39qy01259936244.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/39qy01259936244.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/4shgt1259936244.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/4shgt1259936244.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/595v41259936244.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259936291iwqesmwqcgd8cwo/595v41259936244.ps (open in new window)


 
Parameters (Session):
par1 = 0.01 ; par2 = 0.99 ; par3 = 0.005 ;
 
Parameters (R input):
par1 = 12 ; par2 = 0.99 ; par3 = 0.005 ;
 
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