Home » date » 2009 » Dec » 01 »

3de techniek

*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: Tue, 01 Dec 2009 13:19:53 -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/01/t1259698850edk46c756iehgps.htm/, Retrieved Tue, 01 Dec 2009 21:20:57 +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/01/t1259698850edk46c756iehgps.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 «
105.7 105.7 111.1 82.4 60 107.3 99.3 113.5 108.9 100.2 103.9 138.7 120.2 100.2 143.2 70.9 85.2 133 136.6 117.9 106.3 122.3 125.5 148.4 126.3 99.6 140.4 80.3 92.6 138.5 110.9 119.6 105 109 129.4 148.6 101.4 134.8 143.7 81.6 90.3 141.5 140.7 140.2 100.2 125.7 119.6 134.7 109 116.3 146.9 97.4 89.4 132.1 139.8 129 112.5 121.9 121.7 123.1
 
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
1105.7105.7000
2105.7105.7000
3111.1107.3446418909520.1926458532063762.612083688612880.338190942124921
482.4100.326895275061-0.600075382294971-13.3728498193399-1.42240244421262
56087.5174259941417-1.75053664145693-18.6911621834243-2.69747621349687
6107.389.0505718051163-1.4902476026312015.56053539322020.800690552131691
799.391.5510583669497-1.221516121482694.195902893014521.03906782151807
8113.597.0803743430234-0.8264935982507210.08425501717301.83162986128148
9108.9101.109892214078-0.5732290497640333.079787231349081.35201187170876
10100.2101.863925582374-0.510117976845719-2.978958419564510.375707424520647
11103.9102.401034270145-0.4639029803484010.4466636656543850.299715812680959
12138.7110.632002148510-0.10309458776223819.24495239694232.50755696337587
13120.2114.059543859670-0.1901805608184691.923599800463631.23823994394763
14100.2111.897671017583-0.207307663468807-9.64748941798102-0.605839568422443
15143.2115.869341409268-0.067403366024629223.63028326816221.12517454127873
1670.9107.833054548370-0.40881613499513-30.2736412071263-2.06384449651805
1785.2105.324844806329-0.501441985889379-18.3500702207372-0.552217588272277
18133107.973186321593-0.36976680828296122.27070694976220.854582903422955
19136.6114.966678922867-0.087905667637723314.96599364119662.05648191777593
20117.9116.096642695102-0.04566322306934950.6702329693937470.347822952829285
21106.3114.168671211143-0.104755625208360-6.08193441103327-0.546295481200169
22122.3116.676648421222-0.03095119726685923.105927376598150.76709068478743
23125.5120.6921820958640.06851643078217480.8584643317632871.19918274733023
24148.4124.1427496632150.13239243791482120.90296798566571.01425815229225
25126.3125.0610291254210.1384135708383390.431811122426680.243563898297384
2699.6122.4525348707500.105562095003110-20.1075419925221-0.83038327942993
27140.4119.3445570096270.0414529997028824.1072260256246-0.931303001259527
2880.3116.764696837760-0.0253619980276945-34.0559029742654-0.74137934681779
2992.6115.889376630318-0.0490861674383372-22.5142869220263-0.239630627759551
30138.5116.97627899392-0.017180039799723720.47913333819570.323196170420406
31110.9113.048117077832-0.1225389447257561.50083197840010-1.12744357000475
32119.6113.275214429285-0.1137585418978765.993641895562690.102086436374914
33105113.683652284626-0.101778182958227-9.184792992963550.15411037847406
34109113.091021042820-0.111845557685268-3.61473435456395-0.146100933780694
35129.4116.490495667621-0.04956307271021199.469644577352821.05258495626533
36148.6119.333678281753-0.0074015781001759226.40636848779090.873169678890295
37101.4115.550594678437-0.0513249479897345-10.3879756007015-1.14689559312488
38134.8121.6839036616590.02627995320298277.009258032136811.86291849004383
39143.7122.3329125634870.035917883917676520.76389462399460.184605385249156
4081.6121.0101492497150.0111010033999638-38.1150948868998-0.397874960559327
4190.3118.927498745418-0.0307478101275528-26.6455086896791-0.610582232646936
42141.5118.219588831063-0.044669812710476423.9223417303094-0.197972368086141
43140.7122.4427731218280.041623218108650614.18564309754251.25537409573191
44140.2126.1169269472100.11154794897346210.58897320348971.07616620875523
45100.2124.0275000265560.0722118925801899-21.6929123064011-0.65647133991494
46125.7125.4342658899890.0938822776085803-1.038160301936760.400356465308575
47119.6123.2059865421250.0602670909621095-1.32286003963186-0.6999493453182
48134.7119.5427457946770.012600880442588118.8361764870504-1.12641386259487
49109119.6008519860440.013132936655692-10.64590835745720.0137845121989755
50116.3117.467922575887-0.01247665031126570.948410174632398-0.647659949334143
51146.9118.325760144995-0.0010484032765950327.72304769520860.260848333349537
5297.4121.8105367675770.0495449346456143-27.7929874386571.03843764354762
5389.4121.8679094389740.0496666138056852-32.47547218042370.00232530902919012
54132.1120.0669579327370.020029235645895613.8206473446498-0.550063539746591
55139.8121.1619625789170.03715597514669117.59665876908450.320454294340977
56129120.4567555477610.02572307434404869.26568050088583-0.222191854850823
57112.5122.9349354337480.0614070846420884-12.83357259625880.737088650664419
58121.9122.8804650980570.0598412153965649-0.866591868259193-0.0349580802515319
59121.7122.2828897221490.05166734382252110.0657419627520186-0.198935307335135
60123.1118.5154190772260.007761492859192438.36315541656304-1.15800237558920
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/1ka3f1259698791.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/1ka3f1259698791.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/2xaer1259698791.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/2xaer1259698791.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/3a86c1259698791.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/3a86c1259698791.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/404bl1259698791.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259698850edk46c756iehgps/404bl1259698791.ps (open in new window)


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