Home » date » 2009 » Dec » 11 »

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, 11 Dec 2009 05:50:35 -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/11/t1260535889mobetfc7xscshky.htm/, Retrieved Fri, 11 Dec 2009 13:51:36 +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/11/t1260535889mobetfc7xscshky.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.55 7.55 7.59 7.59 7.59 7.57 7.57 7.59 7.6 7.64 7.64 7.76 7.76 7.76 7.77 7.83 7.94 7.94 7.94 8.09 8.18 8.26 8.28 8.28 8.28 8.29 8.3 8.3 8.31 8.33 8.33 8.34 8.48 8.59 8.67 8.67 8.67 8.71 8.72 8.72 8.72 8.74 8.74 8.74 8.74 8.79 8.85 8.86 8.87 8.92 8.96 8.97 8.99 8.98 8.98 9.01 9.01 9.03 9.05 9.05
 
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.557.55000
27.557.55000
37.597.589907713409920.00240071055502759.22865900841344e-051.06827691323131
47.597.589912787028050.002199074165853578.7212971953873e-05-0.0632927357523968
57.597.589916952693820.001971089964493228.30473061849324e-05-0.0573504975986414
67.577.56995361060425-0.0006481200671535684.63893957548886e-05-0.568004021155119
77.577.56995267101184-0.000563149097515274.73289881560325e-050.0166419211157233
87.597.589927033431130.002315490724445407.29665688688694e-050.52529751643838
97.67.599918856308960.003441370920738348.1143691039594e-050.195559371745820
107.647.639885837596320.008970427704349470.0001141624036819120.92778399049776
117.647.639892686657070.00758334445689940.000107313342932199-0.227196164587133
127.767.759820334213480.0252377562232370.0001796657865165092.84313202135591
137.767.768919389268940.0228611326116433-0.00891938926893606-0.479562959226583
147.767.759914519516490.01779953220032418.54804835116081e-05-0.682317175534645
157.777.769911959494420.01654503131091398.80405055766801e-05-0.196813177933444
167.837.829923919863150.02356028876876897.60801368530244e-051.09615309066543
177.947.939943860431610.03755099795878975.61395683930133e-052.17990158004761
187.947.939936602501330.03146216211983856.339749867429e-05-0.946823552635257
197.947.939931508720760.02635414454852716.84912792434782e-05-0.793200122860028
208.098.089948274228330.04644643893510565.17257716723804e-053.11699660771905
218.188.179953219541070.05352824861689874.67804589345699e-051.09787822891675
228.268.259955736342090.05783443579806844.42636579128188e-050.667259493580475
238.288.279952724558530.05167798520519124.72754414694701e-05-0.953644339934985
248.288.27994928031180.04326709710551875.07196881949043e-05-1.30255387275861
258.288.287818190768960.0375929514288642-0.00781819076896485-0.969939021343275
268.298.289806829944190.03188995663225850.000193170055808733-0.81457050795472
278.38.299799105104040.02832386650653060.000200894895957535-0.551689911682417
288.38.299790738021170.02371024209800770.000209261978827828-0.713852183622498
298.318.309787347566250.02147721305352430.000212652433754479-0.345545158482727
308.338.329787041755440.021236630551990.000212958244557618-0.0372310755894764
318.338.329783361347160.01777813960264530.000216638652835544-0.53524176071904
328.348.339782232878430.01651147148025380.000217767121566926-0.196038543351975
338.488.479797231305620.03662109612036990.0002027686943759983.11238488854689
348.598.589804692304270.0485703758878710.0001953076957256991.84943285114186
358.678.669807367604330.053688430350510.0001926323956699200.792149223483837
368.678.669803541804510.0449457809283370.000196458195488437-1.35315905324315
378.678.677215580175370.0388864245590012-0.00721558017537371-1.00113850041526
388.718.7094157223470.03781170092902670.000584277653006517-0.157265106796134
398.728.719408109769310.03328063696630360.000591890230692181-0.700930959637714
408.728.719400484648380.02785939234252370.000599515351616428-0.838775358579526
418.728.719395141273380.02332171849653520.00060485872662086-0.702150360107278
428.748.739394607936050.02278072454780650.000605392063954994-0.0837190760111358
438.748.739391545928830.01907071822392260.000608454071174561-0.574157866944926
448.748.739389400034620.01596502595019730.000610599965376414-0.4806537862901
458.748.739387896146220.01336516592509150.00061210385378419-0.402379661059021
468.798.78939078513890.01933094041888760.0006092148610994620.923339410461482
478.858.849393470011160.02595358295460150.0006065299888386931.02501872946052
488.868.859392588301180.02335568779656970.000607411698818161-0.402092780351392
498.878.8772340068160.022463385363615-0.00723400681599721-0.145071746740841
508.928.919176842665020.02560261775727760.000823157334982050.465227470300943
518.968.959179988853460.02794800192423070.0008200111465392780.362856825217533
528.978.969176704745630.02502456359000040.000823295254371052-0.452348355170663
538.998.989175935096850.02420621322955840.00082406490315245-0.126636484180673
548.988.979171548808210.01863538113131040.000828451191791742-0.862120579036046
558.988.979169548338480.01560054514019880.00083045166151505-0.469681068759545
569.019.009170842366620.01794547736564670.000829157633376380.362920969542036
579.019.009169492290110.01502313995682510.00083050770989142-0.452295110641569
589.039.029169805738250.01583358679244070.0008301942617446370.125436206750590
599.059.049170025413130.01651205120046700.0008299745868737630.105009900970198
609.059.049169296581140.01382322524033070.000830703418861457-0.416168527928599
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/1k61q1260535833.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/1k61q1260535833.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/29lp81260535833.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/29lp81260535833.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/3s7l61260535833.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/3s7l61260535833.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/4f2fv1260535833.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/4f2fv1260535833.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/5jrqy1260535833.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260535889mobetfc7xscshky/5jrqy1260535833.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