Home » date » 2009 » Nov » 29 »

ws 9 stru

*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, 29 Nov 2009 06:44:20 -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/Nov/29/t1259502295286re7ykibky86x.htm/, Retrieved Sun, 29 Nov 2009 14:45:01 +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/Nov/29/t1259502295286re7ykibky86x.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 «
103,63 103,64 103,66 103,77 103,88 103,91 103,91 103,92 104,05 104,23 104,30 104,31 104,31 104,34 104,55 104,65 104,73 104,75 104,75 104,76 104,94 105,29 105,38 105,43 105,43 105,42 105,52 105,69 105,72 105,74 105,74 105,74 105,95 106,17 106,34 106,37 106,37 106,36 106,44 106,29 106,23 106,23 106,23 106,23 106,34 106,44 106,44 106,48 106,50 106,57 106,40 106,37 106,25 106,21 106,21 106,24 106,19 106,08 106,13 106,09
 
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
1103.63103.63000
2103.64103.6394870710810.0006489104882088420.0005129289192512490.0696065340614257
3103.66103.6594526068850.002152828187893850.0005473931150855970.228816834469941
4103.77103.7692811523340.01373071627881760.0007188476658782521.25458131126306
5103.88103.8791480557600.02628050088312730.000851944240155381.10537017977190
6103.91103.9091436714710.02682882668412440.0008563285285645790.0422866014374643
7103.91103.909170246960.02254584932954390.00082975304009546-0.302820103381684
8103.92103.9191805842540.02043583721685530.000819415746001782-0.140884834159692
9104.05104.0491060205950.03950587008146750.0008939794052764621.22601287192371
10104.23104.2290274303880.0645192108322720.0009725696121246451.56831943482443
11104.3104.2990249185890.06550970858295710.0009750814105284570.0610814551868003
12104.31104.3090457149980.05537813566930070.00095428500233726-0.617957149978106
13104.31104.3335569550220.0500146811198818-0.0235569550220304-0.402404334177696
14104.34104.3388705708210.04194039266301870.00112942917926398-0.42032620218643
15104.55104.5489631415370.07306445515152390.001036858463097041.86784281917169
16104.65104.6489752262340.07806095710062350.001024773766437530.299310728749698
17104.73104.728975934640.07842103480727050.001024065359924980.0215442088356734
18104.75104.7489585574840.06756457067063050.00104144251627414-0.649048239773017
19104.75104.7489421970100.05500300569107090.00105780299042050-0.750590883487078
20104.76104.7589333263750.04663344963020880.00106667362483166-0.499931189073008
21104.94104.9389547245020.07144180792524650.001045275497763371.48151251059090
22105.29105.2889911031710.1232653147800590.001008896828661743.09433629892012
23105.38105.3789875671450.1170760069314460.0010124328549743-0.369520630496941
24105.43105.4289817638050.1045951653654420.00101823619525671-0.7450943267097
25105.43105.4566621681380.0904927124064977-0.0266621681380912-0.92733967289765
26105.42105.4194283093930.06720616181748160.000571690606598565-1.28507598990847
27105.52105.519443021570.07331392882809360.0005569784299908950.364241115792154
28105.69105.6894783275000.0913163919714020.0005216725003322621.07392673202998
29105.72105.7194601053670.07990171474032850.00053989463314945-0.681077595004771
30105.74105.7394456172140.06875177149104690.000554382785935683-0.665373333127532
31105.74105.7394320835020.05595554966121750.000567916497887755-0.763684705238315
32105.74105.7394231186970.04554155157735370.00057688130312154-0.621549981318638
33105.95105.9494445635020.07614813987155970.0005554364980307251.82679941144869
34106.17106.1694598304410.1029190961499510.00054016955864871.59790640483198
35106.34106.3394656248290.1154027139878900.0005343751708999030.745135995494691
36106.37106.3694596206520.0995096109744130.000540379348171504-0.948656153894987
37106.37106.3867748524440.0843515476891247-0.0167748524439978-0.965145018751399
38106.36106.3596673293780.0639284105418560.000332670621857405-1.15357188907121
39106.44106.4396727597150.06692121060963750.0003272402850062760.178510453829056
40106.29106.2896130758590.02653595721121020.000386924141393101-2.40945134794615
41106.23106.2295936983700.01042755884186320.00040630163009411-0.961214208414722
42106.23106.2295917979940.008486693847639670.000408202005607816-0.115827359427076
43106.23106.2295905391920.006907182777739370.000409460808479994-0.0942693049984303
44106.23106.2295897053440.005621700241609420.000410294656446816-0.0767246436068602
45106.34106.3395999610540.02504678518182980.0004000389461614061.15943279787802
46106.44106.4396059550610.03899551545951050.0003940449385849920.83258115499392
47106.44106.4396034169280.03173857464775650.000396583071970762-0.433163251940526
48106.48106.4796038545790.03327598661656550.0003961454205472060.0917682266489144
49106.5106.5051180722730.0318411940036946-0.00511807227287477-0.0899165989108308
50106.57106.5692608970740.0377789513242720.0007391029259396930.339590706536093
51106.4106.399205020961-0.0009077273812927170.000794979039216034-2.30788000980989
52106.37106.369198654227-0.006323486113877670.000801345772593357-0.323145614471233
53106.25106.249178407179-0.02748275134356130.000821592821104137-1.26269159907276
54106.21106.209176592668-0.02981247486444970.000823407332374508-0.139039868929669
55106.21106.209180110003-0.02426403616388700.0008198899965531540.331154835263960
56106.24106.239185320707-0.01416523573736420.0008146792931000750.602763417353139
57106.19106.189182520052-0.02083410598553290.000817479947739854-0.39805261908213
58106.08106.079176848185-0.03742767755383210.000823151814591872-0.990456617980347
59106.13106.129181374549-0.02115774822276940.0008186254508081030.971149592792165
60106.09106.089180580573-0.02466418995182160.000819419426550609-0.209300528484211
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/11au41259502258.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/11au41259502258.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/290bd1259502258.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/290bd1259502258.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/39n3o1259502258.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/39n3o1259502258.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/4v7so1259502258.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/4v7so1259502258.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/5vrf61259502258.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/29/t1259502295286re7ykibky86x/5vrf61259502258.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