Home » date » 2010 » Dec » 27 »

Paper Statistiek

*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: Mon, 27 Dec 2010 13:51:50 +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/27/t12934578340y0ql727gzdkz4w.htm/, Retrieved Mon, 27 Dec 2010 14:50:40 +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/27/t12934578340y0ql727gzdkz4w.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:
STSM - Handelsbalans Belgiƫ (1995-2009)
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2540,9 2370,3 1807,5 1834,8 786,8 1561,4 1347,2 1549,8 1553,8 1822,5 3078,7 1589,1 1791,5 2558,1 2111,8 2083,1 2052,1 2243,5 2622 1952,6 808,9 1709,8 1582,1 865,6 1116,1 1119,4 2350 1975,6 2536,5 2785 2819,7 1829,5 758,3 2921,6 2482 1892,7 1855,1 2151,3 1642,2 1640,5 1366,1 1532,8 824,4 -518,7 -978,5 1162,5 1243,4 1199,5 883,1 1437,2 534,5 -1901,9 -2521,1 -1721,1 -3094,5 -3694,8 -2492,1 -464,6 -626,1 -1711,4
 
Output produced by software:


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


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
12540.92540.9000
22370.32403.24924220022-33.0262994931002-32.8106022456320-0.0515760048945985
31807.51899.08565213502-60.1141201628654-82.2348547681139-0.74644362976417
41834.81882.64971758962-58.3161433188035-48.73157461499650.0691987457464548
5786.8951.7291414174429.4836641318971-147.250014763606-1.54486561578287
61561.41434.8087712959669.3114047653120.441376543590.596275212152444
71347.21332.3801769849762.951184940843818.1019577113344-0.268448903470677
81549.81432.8439500849463.67029822502116.2238711511490.0586189578570718
91553.81761.9921516144754.7134148070017-213.4085996118000.433626576690118
101822.51717.4224740629749.3708619782162106.679397072275-0.141938122958428
113078.72902.7012421211586.8374933633061154.835761928161.76428976802993
121589.11679.0502382532167.1945710549171-64.958398785773-2.03750832693580
131791.51949.6370804574564.7650578145714-162.0433526508020.323219937913877
142558.12506.8468224476784.26331888818342.81632333889570.726993770255664
152111.81944.2956111006964.329629166144179.386023662537-1.00026155177559
162083.12134.6301816564266.1984410650525-53.89724152751520.195339259616548
172052.12263.7955275569966.174771687948-212.8851075133440.0987019302256869
182243.52159.9025488172860.653321444349786.5909073839647-0.255137574025964
1926222424.0447358061566.5839093529423194.2438762565770.313747641755618
201952.62076.8601828481959.9630996849717-116.564294830252-0.640085582793468
21808.91144.7552006802153.1024230173618-317.330581530955-1.54300529308708
221709.81574.9931067369263.9033070902898128.0776797138860.570837091286128
231582.11380.1496173187356.7032657933839206.653722283612-0.398163486321655
24865.6941.3982629135848.0198461424117-66.6457330207683-0.765112410724549
251116.11405.9602167250852.9702601735526-297.5742316766390.644797905478254
261119.41029.3572063303141.565779009491297.763903426313-0.653569597301523
2723501951.6889955928165.2044682151926382.3245580229411.35362415591016
281975.62087.1208400852966.5397906997679-112.8118782175700.108288350326667
292536.52710.5445069436775.1200372660775-184.2974552930750.859445697977624
3027852794.4391876328475.3431442489767-9.597545761866480.0133910501349597
312819.72504.9414993410965.8072491733637321.376837369521-0.560261724028455
321829.52077.3581597566655.7813904742582-238.819698975269-0.759839684374817
33758.31089.7487454403137.0415259598888-312.318146003386-1.60708060136847
342921.62647.7745320098074.8521220679837246.3123131233602.32546493039416
3524822189.9407084471361.180622788213301.720827202298-0.817586433318246
361892.72044.7605976475856.7627624581198-148.290042907563-0.317475004096619
371855.12310.7420105828160.9126764785346-459.4666798306920.321814560881375
382151.31912.3440815499149.6082982037528247.275398265569-0.703030177765467
391642.21401.2983665682235.3859631650194251.070392891113-0.860219024490696
401640.51756.8269252401942.5217123000626-122.1652396994430.492111698744722
411366.11772.7490798958641.9571434471202-406.163857432573-0.0408763740474573
421532.81299.4051998600529.3090398873362242.735406085996-0.789256053377551
43824.4702.57676155100813.5330939003320133.180143958761-0.9604665336808
44-518.7-259.91797349528-8.90646526517968-241.008012500901-1.49932162240393
45-978.5-599.261100829277-16.2626176017902-373.220480693438-0.507453521652441
461162.5645.30257172245914.7253768909594494.333732593161.93189342701042
471243.4958.48011698624722.2199668951932279.5063501671830.457735295304846
481199.51356.0231082157731.0565994374538-163.3506658698440.576251741741529
49883.11408.6091270432931.5526558117382-525.9008102378180.0330468449702881
501437.21041.3740407826721.7185000690529403.059029505694-0.611178060320598
51534.5397.4227964035725.01968152845378149.151787224210-1.02080702000920
52-1901.9-1461.04183172475-39.6640626649202-406.986280739806-2.85994318013708
53-2521.1-1991.11924917610-51.2521024069567-521.066134070186-0.75249704565682
54-1721.1-2197.50832982783-55.0939319890017479.222395490493-0.237790496988483
55-3094.5-3305.76705295137-81.5250695603381230.370331104769-1.61487216135076
56-3694.8-3359.74803760573-80.8552193909207-335.5523216818580.0422595034494663
57-2492.1-2187.74927976893-50.691880992268-327.1106978617981.92188280508946
58-464.6-1212.04089779946-25.1622688718237728.8224421793671.57333724598374
59-626.1-888.620432616458-16.4024760290047256.1976491875430.534457103630498
60-1711.4-1176.84040422838-23.0854439324801-529.624050185194-0.416935505309733
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/1cgfk1293457907.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/1cgfk1293457907.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/2npfn1293457907.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/2npfn1293457907.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/3yheq1293457907.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/3yheq1293457907.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/4yheq1293457907.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/4yheq1293457907.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/5yheq1293457907.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t12934578340y0ql727gzdkz4w/5yheq1293457907.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 4 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
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