Home » date » 2009 » Dec » 04 »

decomposition 3

*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 02:08:52 -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/t1259917787hzdwioeejadtyrf.htm/, Retrieved Fri, 04 Dec 2009 10:09:53 +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/t1259917787hzdwioeejadtyrf.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 «
5.7 6.1 6 5.9 5.8 5.7 5.6 5.4 5.4 5.5 5.6 5.7 5.9 6.1 6 5.8 5.8 5.7 5.5 5.3 5.2 5.2 5 5.1 5.1 5.2 4.9 4.8 4.5 4.5 4.4 4.4 4.2 4.1 3.9 3.8 3.9 4.2 4.1 3.8 3.6 3.7 3.5 3.4 3.1 3.1 3.1 3.2 3.3 3.5 3.6 3.5 3.3 3.2 3.1 3.2 3 3 3.1 3.4
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
15.75.7000
26.16.078848808155180.0215060924499840.02115119184481911.52963603821458
365.980813892529930.01962100348398880.0191861074700705-0.801081630437777
45.95.88069744406510.01712372703716410.0193025559349021-0.799935278947233
55.85.781088151670590.01405270267455250.0189118483294073-0.777645075668014
65.75.681462570957760.01048677029241740.0185374290422363-0.75523168838216
75.65.58180852612280.006511700617818870.0181914738772051-0.729844260706367
85.45.38304916150118-0.001793076119048780.0169508384988162-1.35693753496063
95.45.38158935004924-0.001778258999001890.01841064995076120.00219809645207262
105.55.481098255717130.003093705847696490.0189017442828710.666675182117168
115.65.581066361864410.008071734079842410.01893363813559040.636426540786974
125.75.680853126931680.01305490102885910.01914687306831690.601498343837729
135.95.97734197788740.0209125052151983-0.07734197788739932.21508419190292
146.16.089175103335490.02737737092666050.01082489666450650.507280713144852
1565.993510372838770.01988678475007540.0064896271612301-0.802957580818163
165.85.793284811012750.006161774185131050.006715188987245-1.43433420819565
175.85.790403397391360.005582289935316180.0095966026086434-0.0588758815277227
185.75.69260724985264-0.001193051118602980.00739275014736436-0.672481894469816
195.55.4924861031196-0.01448313399011780.00751389688039589-1.29307690457191
205.35.29372235341134-0.02699805579610810.00627764658865619-1.19708640493505
215.25.19170791706359-0.03216443112174470.00829208293641082-0.48702920834903
225.25.19063437628873-0.02999741034528120.009365623711272950.201751549253228
2354.99328022398454-0.04178437410929330.00671977601545689-1.08556691450785
245.15.09056384911272-0.03191538656196950.0094361508872840.901520025084876
255.15.16914873806469-0.0246871781444536-0.06914873806469420.781885054008576
265.25.19018446917844-0.02124975388819030.009815530821559470.271193288844019
274.94.89828077600158-0.04087597698765540.00171922399842354-1.75352693601003
284.84.79539959618549-0.04538086768695260.00460040381450809-0.401373510111418
294.54.49613858087191-0.06390856744744070.00386141912809288-1.64331607786774
304.54.49072297243223-0.05962465368841740.009277027567767070.378560208904886
314.44.39349943229872-0.06238661391568480.006500567701279-0.243303499934338
324.44.3933599153963-0.05780225393199410.006640084603703010.402756441979409
334.24.19724190768549-0.06801134214428820.00275809231451025-0.894853206835917
344.14.08988793987476-0.07092072118641030.0101120601252424-0.254511840152121
353.93.89815198280308-0.07987062487664710.00184801719691903-0.78156431551142
363.83.79322121014328-0.08172788237400840.0067787898567181-0.162036599737284
373.93.9401539810759-0.0651558348692222-0.04015398107590241.56651754070755
384.24.18187184769333-0.04212479787037150.01812815230666711.87004402768307
394.14.10109719577813-0.0450017564418658-0.00109719577812907-0.250035773377558
403.83.79598262698776-0.06435803644205270.00401737301224230-1.68135936194194
413.63.59820658684057-0.07429377583764880.00179341315942727-0.862497209824643
423.73.68509853743323-0.06228324024159980.01490146256676961.04200965505825
433.53.49879582636976-0.07152873990078320.00120417363024326-0.801727117250042
443.43.39102150805701-0.07423189293481980.00897849194299096-0.234306505665383
453.13.10135690759451-0.090304158839998-0.00135690759450704-1.39262646837832
463.13.08457632567703-0.08481728736318880.01542367432297410.47527926407406
473.13.09429375033841-0.07776007256963010.005706249661594810.611148465526161
483.23.19298645835192-0.06459306594431740.007013541648077841.14009233794824
493.33.35273618860181-0.0479862437124517-0.05273618860180951.51226097657081
503.53.48072067290545-0.03483154931399660.01927932709454801.08868800693393
513.63.59440210036854-0.02373895748132250.005597899631459710.960308896214668
523.53.49585695527987-0.02932605013256510.00414304472012664-0.483341446501009
533.33.30672158577066-0.0412631631007524-0.00672158577066073-1.03268373535159
543.23.18419733750798-0.04733360816851540.0158026624920215-0.525128986295893
553.13.10017755206214-0.0500743730394271-0.000177552062141973-0.237075410837949
563.23.18270208583513-0.04016751603733350.01729791416486530.856887313562906
5733.00727807172696-0.0502734642826878-0.00727807172695857-0.874061653703504
5832.98431228219589-0.04823300710328280.01568771780411270.176472542310693
593.13.09323284994450-0.03648936192442720.006767150055502791.01567524940561
603.43.39004921441626-0.01159316499311830.00995078558373532.15284544647217
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259917787hzdwioeejadtyrf/1saqz1259917721.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259917787hzdwioeejadtyrf/1saqz1259917721.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259917787hzdwioeejadtyrf/3ge7e1259917721.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259917787hzdwioeejadtyrf/3ge7e1259917721.ps (open in new window)


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


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