Home » date » 2010 » Dec » 22 »

Paper

*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, 22 Dec 2010 11:54:13 +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/22/t1293018747thzchhg5v6skxt5.htm/, Retrieved Wed, 22 Dec 2010 12:52:27 +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/22/t1293018747thzchhg5v6skxt5.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:
Paper, Julie Loockx,Tom Aerts
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5745 4549 5074 3602 2732 2589 2148 2330 2752 3241 4517 6550 6778 6240 5570 3558 3299 2447 2380 2378 2947 3651 4816 6436 7090 4682 4198 3860 3056 2563 2568 2472 2821 4015 4686 5418 5649 4572 4695 3766 2900 2528 2549 2478 2828 4139 5390 5621 5291 5272 4677 3520 2842 2723 2581 2429 2606 3787 4630 5505 5577 4911 4701 3557 2921 2734 2636 2433 2640 3794 4745 5698 5909 5119 5200 3876 3104 2251 2386 2794 2967 3392 4741 5909 5901 4962 4751 3909 3130 2860 2568 2540 2894 4216 4530 5144 6206 5645 4601 3645 3140 2264 2557 2431 2747 4587 4512 5313 6011 5328 5014 3630 3102 2739 2877 2659 2957 3785 4785 5757 5458 5427 5018 3498 3204 2763 2589 2591 2805 3278 4615 5524 6167 5380 5377 3603 2774 2470 2407 2512 2451 3134 4210 4859 5022 4584 4267 3022 2777 2428 2389 2496 2820 3854 4748 5666 5293 4905 4920 3854 2659 2491 2455 2472 3030 3987 4453 5417
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
157455745000
245494583.12496054395-634.74060010412-34.1249605439455-1.60921168718610
350745107.50081504538297.690233197921-33.50081504538451.6292162222774
436023659.41791534905-1081.59609237935-57.4179153490463-2.59877823555924
527322765.24515441902-933.300438540454-33.24515441902280.280676792828321
625892621.46392652749-308.375150507679-32.46392652749241.18292109826942
721482190.24134539226-405.619453640356-42.2413453922578-0.184074585908808
823302363.6340789410152.726844161936-33.63407894100730.86760790422315
927522789.21289563944347.877830294407-37.21289563944380.558694011062717
1032413279.81416452545460.858323483543-38.81416452545100.213861812804205
1145174549.182720533551100.87864777085-32.18272053355291.211500347744
1265506582.660592255381839.12840289046-32.66059225538361.39743973919311
1367786680.27808832406484.02072043116997.7219116759385-2.81506546687989
1462406297.19021964589-106.402029413274-57.1902196458852-1.06442794958644
1555705563.04346512636-602.7980943985316.95653487364284-0.916404626915557
1635583612.30238027603-1660.22353602289-54.3023802760277-1.99560584891385
1732993294.48212570124-605.9993978073994.517874298760311.99546047402660
1824472463.53446485263-782.69201213698-16.5344648526270-0.334462817576980
1923802394.02384915381-222.494340623727-14.02384915381211.06040318681608
2023782394.95942881150-46.9909426094619-16.95942881150270.332211989714042
2129472951.12143114405426.784166036373-4.121431144051450.89681325402333
2236513669.41971027106655.768518124376-18.41971027106020.433446581723032
2348164843.463005684131062.90207541697-27.46300568412910.770669382990214
2464366423.134456155031468.6764816367112.86554384497310.768127981106535
2570906981.02483556705757.934136933932108.975164432949-1.40754423001409
2646824793.81616955308-1359.92174852263-111.816169553084-3.91617078382164
2741984143.29302277182-803.66091706089254.70697722817841.04023899704093
2838603963.97137179622-316.778148587224-103.971371796220.91882090233475
2930563081.24472234651-758.534611759854-25.2447223465142-0.836170004752717
3025632610.92592995345-533.514363435528-47.92592995344770.425942929474969
3125682596.20197726691-128.480755445237-28.20197726691100.766691809890445
3224722527.81309833962-81.5654966889139-55.81309833962470.0888063221177803
3328212842.61345831146227.887425011354-21.61345831145640.585766286939003
3440154043.01371964002987.166852741298-28.01371964001861.43724708900606
3546864779.16598659578791.171736233785-93.1659865957795-0.371005288397555
3654185425.04665793953677.818851586852-7.04665793953413-0.214611664658895
3756495192.63456013099-31.127555326761456.365439869009-1.37854231280790
3845724701.31517984799-370.179294826956-129.315179847994-0.632649101700903
3946954657.29957989214-116.00612978010537.70042010785910.478391762104228
4037663865.54650848462-640.695836988718-99.5465084846168-0.990071048294324
4129002929.74700764592-869.99350463164-29.7470076459164-0.434014673477801
4225282574.14544809139-470.188140110738-46.14544809138660.756794754536918
4325492560.91845101570-115.026485736590-11.91845101569570.672288783787396
4424782529.73114513503-49.8654465282052-51.73114513503260.123343924733736
4528282871.09177484236254.201361619474-43.09177484236020.575570877918431
4641394133.891605369681038.130634042615.108394630317091.48390817604613
4753905488.175902938551283.87611788140-98.17590293854630.465181406770233
4856215637.0477779852402.593266834372-16.0477779852030-1.66897433278925
4952914859.76582102506-514.058854640084431.234178974936-1.76519950266631
5052725399.68046952567272.740099669306-127.6804695256681.47486063112134
5146774636.18073455392-531.07805721328740.8192654460758-1.51826941616035
5235203597.00008341558-924.397334208503-77.0000834155844-0.7421805664489
5328422862.41070038300-777.405379190086-20.41070038299680.278217131583650
5427232754.08369479152-259.057503168874-31.08369479152040.981183787550011
5525812577.30443704078-195.3155798468113.695562959217360.120657654987935
5624292462.45476059208-132.979285416366-33.45476059208250.117996939821794
5726062659.78265625930122.907993153395-53.78265625930320.484371391755745
5837873774.42122694303891.24148934984612.57877305697011.45439026555944
5946304692.40466780937911.959712953363-62.4046678093680.0392181616731331
6055055471.95398831981809.49967095283333.0460116801893-0.194094888979738
6155775313.0845279942958.9357803602094263.915472005711-1.43692690437648
6249115014.04896816155-210.407149164102-103.048968161551-0.506265719007395
6347014634.40886080925-341.2382327749766.591139190749-0.247605231019226
6435573646.42039341876-840.816309861389-89.4203934187629-0.942800673976922
6529212959.12552712789-722.213916565466-38.12552712788920.224471957969904
6627342749.81878062575-325.790564374795-15.818780625750.750392196064185
6726362621.9943357961-172.78202819275614.00566420389800.289631019056236
6824332461.08749664138-163.603975706313-28.08749664138070.0173732197326713
6926402718.61655036838161.882458529167-78.61655036838390.616116257013197
7037943758.86151301945840.7995364585135.13848698054531.28513756874563
7147454815.549125142251007.65558506731-70.54912514224980.315843500076653
7256985639.87323879699866.13412061600758.1267612030108-0.26815939844955
7359095667.64818864416217.652665928126241.351811355841-1.23684983078968
7451195243.13711343859-267.954517231576-124.137113438595-0.914386649593972
7552005092.63263003697-177.381958106535107.3673699630320.171598775135471
7638763990.47952681355-890.62674139529-114.479526813550-1.34631690126737
7731043157.28664266188-846.335990235225-53.28664266187530.083821356418005
7822512274.89128053244-874.157476727433-23.8912805324375-0.0526635550221556
7923862331.33744844855-156.12637293767354.66255155144821.35916482313889
8027942805.29369921482330.012094441341-11.29369921481710.920215967781047
8129673084.76360567909291.01591809546-117.763605679086-0.0738162321227408
8233923372.91992240782288.80942694030219.0800775921786-0.00417673451737392
8347414784.226776080661154.80763774329-43.22677608065781.63924031380168
8459095830.298905597961071.0128736288578.7010944020395-0.158807569681491
8559015675.36370587385124.330203578957225.636294126149-1.80113672638614
8649625128.29698704532-385.077426108399-166.296987045319-0.960373951779434
8747514601.20466139121-494.392193011438149.795338608794-0.207222832509773
8839094024.43545083412-557.85509089062-115.435450834117-0.119824293177152
8931303171.00312472234-785.48510082336-41.0031247223366-0.430766186088519
9028602899.43890762434-389.497725786278-39.43890762434190.749570407037046
9125682544.83905550805-362.6062586171923.16094449195450.0509029199398384
9225402532.75787890302-92.5091245149317.242121096977150.511269276051538
9328942973.03497537380318.035816329874-79.03497537380470.777124903621381
9442164227.039723605311039.29806374472-11.03972360530971.36530330744206
9545304618.74103151183540.370523915933-88.7410315118334-0.944412075533558
9651445024.98381361095437.133923728171119.01618638905-0.195677567876268
9762065923.45680974899792.883309439304282.5431902510110.67570738230491
9856455832.29606967122120.610213662823-187.296069671223-1.26852250053196
9946014500.93597019182-995.506523319604100.064029808180-2.11629713195079
10036453730.59961330537-822.187554079957-85.5996133053660.327338872668482
10131403195.68863307528-601.179317568575-55.68863307527940.418206958715336
10222642308.88102301892-821.033266538141-44.8810230189171-0.416166026002402
10325572505.57016988298-37.589327242343551.42983011702261.48298068748654
10424312441.41468152344-58.0394664365252-10.4146815234386-0.0387102366582167
10527472872.07067825772318.155695426416-125.0706782577220.712104724686597
10645874526.650572777931346.9666744235760.34942722206991.94747493257722
10745124636.78122900601395.103021416433-124.781229006014-1.80177702616593
10853135228.06048243145545.96227614946984.93951756855060.285959637314573
10960115695.19836506912485.249278688458315.801634930882-0.115185421959828
11053285456.69348583697-65.9995978710951-128.693485836972-1.04082141224295
11150144937.99098063533-413.63223239884976.0090193646676-0.659202771506064
11236303755.53047469228-1005.00359339297-125.530474692277-1.11721929683203
11331023113.55352328629-725.945783304852-11.55352328628970.528019745248705
11427392816.77009413377-395.887234154379-77.77009413376570.624775699691581
11528772796.57372564623-106.91201620687880.42627435376870.547000514954322
11626592679.15097086600-114.996590335748-20.1509708660039-0.0153033471360396
11729573151.36661885122336.6787036673-194.3666188512210.854983586938775
11837853656.57975841784466.314969566494128.4202415821590.24539300117528
11947854900.828811388561064.48980044946-115.8288113885641.13229708723003
12057575692.21887878189854.61897230505964.7811212181139-0.397821398096523
12154585163.28807541095-210.011550582216294.711924589053-2.01822504335563
12254275529.48308874075229.345316136610-102.4830887407490.829950334054948
12350184918.99100296404-415.06895053543199.008997035961-1.22194577634970
12434983657.22527978197-1065.95578086281-159.225279781970-1.22999676492972
12532043207.37684731513-592.662019724528-3.376847315129930.895496442229227
12627632846.33615551759-414.650356960942-83.3361555175860.336962504073782
12725892492.89030312440-367.60377077247796.10969687560440.089054341466806
12825912614.658473096238.56587507957673-23.65847309622550.712053560727587
12928052982.39061515009284.653472098788-177.3906151500930.522611866587421
13032783201.94580305805234.61355509271076.054196941951-0.0947219934160401
13146154695.561992341271202.00823500354-80.56199234127131.83123814877068
13255245405.85850700666824.339713471138118.141492993344-0.715869392020784
13361675938.54309967967600.092957772198228.456900320332-0.42487011538886
13453805481.81246072992-206.371537796036-101.812460729922-1.52397110466587
13553775224.68056952211-245.297122304613152.319430477895-0.073805237126233
13636033827.3589955114-1130.45824662906-224.358995511402-1.6731359458843
13727742782.24069943703-1064.9345616323-8.240699437025310.123969012175535
13824702519.11542725241-449.063693678611-49.11542725241241.16579388743817
13924072321.16788649742-256.14211404460885.83211350257510.365180800033666
14025122532.92548242099103.330125869463-20.92548242098620.680446300509848
14124512608.3903256628581.9218509898412-157.390325662848-0.0405242509079384
14231343120.1162509768412.11874563283813.88374902319950.625036446124412
14342104253.24398865817965.802834924559-43.24398865817311.04812712553942
14448594759.34212849329612.8694576224399.6578715067116-0.668946667614842
14550224766.31005616005147.318924001017255.689943839954-0.881715003316832
14645844711.08830240668-7.32798198599137-127.088302406681-0.29231686636252
14742674068.8735341501-493.963987713854198.126465849904-0.92259353701329
14830223245.68958550299-746.810568932461-223.689585502988-0.478040659572612
14927772809.01417300751-508.79343197143-32.01417300751440.45030793242925
15024282475.98579749085-373.854607715170-47.98579749084840.255427130656029
15123892317.049989634-208.81915637363271.95001036599860.312395508917482
15224962490.5972313062584.80755611338345.402768693746620.55580653948616
15328202977.22214042486393.374136602075-157.2221404248550.584094441080313
15438543873.12457219864779.255284836838-19.12457219863850.730438853559673
15547484776.49311306013874.518406657406-28.49311306012880.180338491570774
15656665547.14796731978794.806809477821118.852032680215-0.151073747071101
15752935080.83356017145-173.637708338467212.16643982855-1.83365540156753
15849055000.15826443282-102.628692824334-95.15826443282430.134252114211408
15949204703.36532061086-251.399085407948216.634679389142-0.282015305242943
16038544100.02936793062-521.587841802198-246.029367930622-0.510930686383702
16126592721.3726063851-1179.11643566086-62.3726063851012-1.24396208623790
16224912507.55786979756-438.347626009486-16.55786979755821.40219971106474
16324552378.62777182269-200.84319306849376.37222817731390.449572629558499
16424722466.2919080099520.62079713318555.708091990048990.419209244927771
16530303189.45418371289559.90930549315-159.4541837128931.02083613269349
16639874013.77690653731762.861905240985-26.77690653730520.384169586096402
16744534506.22205714631555.390608223538-53.2220571463152-0.392765608342858
16854175229.29318341006684.040022511748187.706816589940.243803620825604
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/1csay1293018846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/1csay1293018846.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/2csay1293018846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/2csay1293018846.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/34jaj1293018846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/34jaj1293018846.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/44jaj1293018846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293018747thzchhg5v6skxt5/44jaj1293018846.ps (open in new window)


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