Home » date » 2010 » Dec » 26 »

STSM Dollar

*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: Sun, 26 Dec 2010 13:32:25 +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/26/t1293370265yojxu3s9qh9tb3z.htm/, Retrieved Sun, 26 Dec 2010 14:31:11 +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/26/t1293370265yojxu3s9qh9tb3z.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 «
0,8973 0,9383 0,9217 0,9095 0,892 0,8742 0,8532 0,8607 0,9005 0,9111 0,9059 0,8883 0,8924 0,8833 0,87 0,8758 0,8858 0,917 0,9554 0,9922 0,9778 0,9808 0,9811 1,0014 1,0183 1,0622 1,0773 1,0807 1,0848 1,1582 1,1663 1,1372 1,1139 1,1222 1,1692 1,1702 1,2286 1,2613 1,2646 1,2262 1,1985 1,2007 1,2138 1,2266 1,2176 1,2218 1,249 1,2991 1,3408 1,3119 1,3014 1,3201 1,2938 1,2694 1,2165 1,2037 1,2292 1,2256 1,2015 1,1786 1,1856 1,2103 1,1938 1,202 1,2271 1,277 1,265 1,2684 1,2811 1,2727 1,2611 1,2881 1,3213 1,2999 1,3074 1,3242 1,3516 1,3511 1,3419 1,3716 1,3622 1,3896 1,4227 1,4684 1,457 1,4718 1,4748 1,5527 1,575 1,5557 1,5553 1,577 1,4975 1,4369 1,3322 1,2732 1,3449 1,3239 1,2785 1,305 1,319 1,365 1,4016 1,4088 1,4268 1,4562 1,4816 1,4914 1,4614 1,4272 1,3686 1,3569 1,3406 1,2565 1,2208 1,277 1,2894 1,3067 1,3898 1,3661
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time22 seconds
R Server'George Udny Yule' @ 72.249.76.132


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
10.89730.8973000
20.93830.9361680000758570.002131999981607670.002131999924143490.719789379959892
30.92170.9196426294853430.002057370514656870.00205737051465687-0.576589013356853
40.90950.9074992063513080.002000793648691970.00200079364869197-0.43885908541227
50.8920.8900762845855040.001923715414496090.00192371541449609-0.600262709021044
60.87420.872353937006820.001846062993179540.00184606299317955-0.60712930680806
70.85320.8514435294089050.001756470591094950.00175647059109495-0.70324589433565
80.86070.8589210937476030.001778906252396940.001778906252396940.176798275288377
90.90050.8985731517515510.001926848248448910.001926848248448911.17038054590496
100.91110.9091395348849680.001960465115031640.001960465115031640.266982454359909
110.90590.9039671814678740.001932818532125900.00193281853212590-0.22041963125948
120.88830.8864423076915090.001857692308491090.00185769230849110-0.601280598491724
130.89240.905042782002020.00114934384135221-0.01264278200201930.625104324837924
140.88330.8827189092438360.0005810909176224560.00058109075616367-0.617150691080449
150.870.8694441016126880.0005558983873115580.000555898387311558-0.427738378143892
160.87580.8752346014290860.000565398570914010.0005653985709140080.161594444562762
170.88580.8852175406678660.0005824593321341590.0005824593321341580.290723138479871
180.9170.9163622743517440.0006377256482556140.0006377256482556130.943467737986584
190.95540.9546942342211860.0007057657788141930.0007057657788141881.16363185376618
200.99220.9914293165369840.0007706834630161120.0007706834630161161.11223356048264
210.97780.9770565529511770.0007434470488226530.000743447048822651-0.467481051705424
220.98080.9800525089496740.0007474910503257730.0007474910503257740.0695352618423683
230.98110.9803533094702970.000746690529703110.00074669052970311-0.0137893760960925
241.00141.000618392847980.0007816071520236520.0007816071520236570.602533546637026
251.01831.022367253987450.000369750381056052-0.004067253987451860.713132395721076
261.06221.061232353252180.000967647092140390.0009676467478230251.07923218202040
271.07731.076315746161160.0009842538388363160.0009842538388363160.435620405996686
281.08071.079712910778580.0009870892214241750.0009870892214241760.0744638262205396
291.08481.083809261411020.000990738588980930.0009907385889809250.0959535445590255
301.15821.157124473055580.0010755269444150.001075526944415002.23197211870050
311.16631.165216257298290.001083742701709460.001083742701709460.216525323582058
321.13721.13615151867710.00104848132290060.00104848132290060-0.930397066629317
331.11391.112879929971560.001020070028436370.00102007002843637-0.750528895038914
341.12221.121171445205380.001028554794618330.001028554794618330.224400094803468
351.16921.168117927811320.001082072188681320.001082072188681321.41704710199551
361.17021.169118023244090.001081976755911460.00108197675591147-0.00252983641068476
371.22861.231830479102560.000293679943058873-0.003230479102558362.03015823521528
381.26131.260679826419860.0006201739517839610.0006201735801405590.822743273075176
391.26461.263977497792100.0006225022078956580.0006225022078956560.0826165150682867
401.22621.225611371488130.0005886285118687320.000588628511868731-1.20302763429544
411.19851.197935906288940.000564093711057030.000564093711057025-0.872112569222154
421.20071.200134488692660.0005655113073355730.0005655113073355690.0504335151012443
431.21381.213223636322720.0005763636772817620.0005763636772817570.386427123844363
441.22661.226013062244040.0005869377559616290.0005869377559616310.376843963350759
451.21761.217021348274020.000578651725984660.000578651725984655-0.295556974759445
461.22181.221218221030610.0005817789693950240.0005817789693950230.111643067623664
471.2491.248395254492160.0006047455078399220.0006047455078399240.820617276699492
481.29911.298452586174080.0006474138259165060.0006474138259165131.52589746785340
491.34081.343309992247430.000228181150751563-0.002509992247431251.43289733918776
501.31191.31195751751124-5.75172094124582e-05-5.75175112391054e-05-0.923787347527385
511.30141.30146471394875-6.47139487463972e-05-6.47139487463975e-05-0.321960909050973
521.32011.32015179059389-5.17905938875944e-05-5.17905938875955e-050.578550687159317
531.29381.29386985542915-6.98554291530096e-05-6.98554291530128e-05-0.809280825252152
541.26941.26948658867612-8.65886761151433e-05-8.6588676115135e-05-0.75014351780507
551.21651.21662288654811-0.000122886548113697-0.000122886548113710-1.62833588646427
561.20371.20383159335556-0.000131593355556708-0.000131593355556709-0.390859123249421
571.22921.2293140013242-0.000114001324198682-0.0001140013241986870.790270159476723
581.22561.22571639226945-0.000116392269450691-0.000116392269450689-0.107479911221673
591.20151.20163283065485-0.000132830654854464-0.000132830654854457-0.739460015823206
601.17861.17874842460423-0.000148424604234408-0.000148424604234397-0.701955083145818
611.18561.18355654658199-0.0001857684471812410.002043453418006040.159080800000323
621.21031.210284343381081.56572096051783e-051.56566189187376e-050.794887083394606
631.19381.193793774903666.22509633846648e-066.22509633846237e-06-0.509238108595697
641.2021.201989098092321.09019076806727e-051.09019076806693e-050.252644075485236
651.22711.227074786002352.52139976462872e-052.52139976462837e-050.77358886463599
661.2771.276946351123625.36488763778315e-055.36488763778158e-051.53782273133959
671.2651.264953219298424.67807015782706e-054.67807015782585e-05-0.371658301438412
681.26841.268351309720574.86902794334402e-054.86902794334381e-050.103392093456135
691.28111.281044109204055.58907959477543e-055.58907959477515e-050.390086508713718
701.27271.272648919152475.10808475273547e-055.10808475273545e-05-0.260726322077641
711.26111.261055542847084.44571529172106e-054.44571529172181e-05-0.359245882233398
721.28811.288040227200405.97727995974264e-055.97727995974367e-050.831139141747973
731.32131.31977953232277-0.0001382242697619540.001520467677232521.01010353885725
741.29991.30016253715576-0.000262536511629337-0.000262537155756682-0.579149806124275
751.30741.30765875176239-0.00025875176239054-0.0002587517623905470.239357361856446
761.32421.32445043853225-0.000250438532250292-0.0002504385322502940.526005722246638
771.35161.35183697022595-0.000236970225948186-0.0002369702259481890.852599933467548
781.35111.35133709828326-0.000237098283260704-0.000237098283260719-0.00811051131064872
791.34191.34214145979171-0.000241459791714629-0.000241459791714642-0.276370706043170
801.37161.37182689682788-0.000226896827884425-0.0002268968278844250.923243791336669
811.36221.36243135628403-0.000231356284027731-0.000231356284027736-0.282852326226023
821.38961.38981792997178-0.000217929971779064-0.0002179299717790630.85201203765279
831.42271.42290174836754-0.000201748367538827-0.0002017483675388171.02735748709004
841.46841.46857946596999-0.000179465969991662-0.0001794659699916541.41537936052940
851.4571.45576785886849-0.0001120127923091050.00123214113150733-0.400885417667154
861.47181.47182208552311-2.20850528384655e-05-2.20855231064326e-050.483015563945238
871.47481.47482079960929-2.07996092865899e-05-2.07996092865991e-050.0931887102666743
881.55271.552687670025481.23299745226668e-051.23299745226656e-052.40275850807065
891.5751.574978198004762.18019952362484e-052.1801995236246e-050.687260575964102
901.55571.555686406075031.35939249668178e-051.35939249668084e-05-0.595805391588276
911.55531.555286581698741.34183012611066e-051.34183012610881e-05-0.0127535471442651
921.5771.576977376869982.26231300223300e-052.26231300223298e-050.668725651736666
931.49751.49751111577719-1.11157771902430e-05-1.11157771902597e-05-2.45215329503835
941.43691.43693681080259-3.68108025855725e-05-3.68108025855654e-05-1.86831419303888
951.33221.33228117840090-8.11784009049724e-05-8.11784009049554e-05-3.22738637555187
961.27321.27330614399737-0.000106143997373435-0.000106143997373419-1.81681659651114
971.34491.34029250321298-0.0004188632752014340.004607496787015182.12168274049330
981.32391.32439517043736-0.000495169729131669-0.000495170437359888-0.464198006944616
991.27851.27901210851334-0.00051210851334077-0.000512108513340797-1.38471439959318
1001.3051.30550192295480-0.000501922954796684-0.0005019229547966860.832962897304774
1011.3191.3194964567207-0.000496456720698833-0.0004964567206988330.447190733508145
1021.3651.36547893733704-0.000478937337035333-0.0004789373370353581.43379509933716
1031.40161.40206497163934-0.000464971639336542-0.0004649716393365591.14339040360970
1041.40881.40926208573211-0.000462085732113682-0.0004620857321136830.236362103863591
1051.42681.42725513726362-0.000455137263621688-0.0004551372636216960.569309051615043
1061.45621.45664390508557-0.000443905085569105-0.0004439050855691030.920632767706364
1071.48161.48203418568047-0.000434185680468259-0.0004341856804682460.796939814445722
1081.49141.49183033824327-0.000430338243272688-0.0004303382432726660.315588166222294
1091.46141.45817752628093-0.0002929520821801220.00322247371907478-1.04770908504202
1101.42721.42762688198742-0.000426881272697738-0.000426881987422614-0.910106933769154
1111.36861.36904659423600-0.000446594236002106-0.000446594236002148-1.79389832891346
1121.35691.35735040636418-0.000450406364182928-0.000450406364182928-0.347023970123027
1131.34061.34105577364792-0.000455773647923225-0.000455773647923226-0.488757744923583
1141.25651.25698408922047-0.000484089220465286-0.000484089220465286-2.57935734701830
1151.22081.22129600661479-0.000496006614790545-0.000496006614790565-1.08596166606329
1161.2771.27747682664536-0.00047682664535952-0.0004768266453595181.74834874251846
1171.28941.28987247195385-0.000472471953850926-0.0004724719538509360.397085902614751
1181.30671.30716646368251-0.00046646368250685-0.0004664636825068470.548054164694782
1191.38981.39023822223652-0.000438222236516553-0.0004382222365165462.57696009795879
1201.36611.36654608094287-0.000446080942870452-0.000446080942870432-0.717329343443493
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/1dwvg1293370322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/1dwvg1293370322.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/265c11293370322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/265c11293370322.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/365c11293370322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/365c11293370322.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/4gxt41293370322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/4gxt41293370322.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/5r6a71293370322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293370265yojxu3s9qh9tb3z/5r6a71293370322.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
bitmap(file='test1.png')
plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time')
grid()
dev.off()
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='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