Home » date » 2010 » Dec » 08 »

*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: Wed, 08 Dec 2010 15:45:34 +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/08/t12918247105ulu57gexvf37ma.htm/, Retrieved Wed, 08 Dec 2010 17:11:50 +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/08/t12918247105ulu57gexvf37ma.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
186448 190530 194207 190855 200779 204428 207617 212071 214239 215883 223484 221529 225247 226699 231406 232324 237192 236727 240698 240688 245283 243556 247826 245798 250479 249216 251896 247616 249994 246552 248771 247551 249745 245742 249019 245841 248771 244723 246878 246014 248496 244351 248016 246509 249426 247840 251035 250161 254278 250801 253985 249174 251287 247947 249992 243805 255812 250417 253033 248705 253950 251484 251093 245996 252721 248019 250464 245571 252690 250183 253639 254436 265280 268705 270643 271480
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Structural Time Series Model
tObservedLevelSlopeSeasonalStand. Residuals
1186448186448000
2190530189443.2064788391029.33220419497890.0207857548050.78251421709684
3194207192177.6124648631813.076906997381363.11206947771.19727220457306
4190855191178.419501414367.997511965863726.732141889124-1.83451990864378
5200779198822.7049438963969.89691894923-55.64647017103784.36671979599958
6204428203897.8163569824508.1880655856175.6771377132010.675983271386587
7207617207341.3452192003983.15050013976632.88765731804-0.6728272749546
8212071212275.9340280504455.45675943443-520.6443521822080.591445455685734
9214239215377.1000183623803.47772783333-719.381390605238-0.837915511501245
10215883216768.7592257602621.69110652560-135.938302770319-1.45949284190488
11223484221608.5133916473705.80559190981168.663806567371.37130233416204
12221529223102.8149105692619.75285702308-864.77164899968-1.36439297924419
13225247225552.5729903652537.20477824852-252.541586212481-0.104653900094717
14226699227521.9373555482259.83846030852-645.369317087628-0.346615296785494
15231406229793.5942814742265.600412191411608.686883953170.00726734027529162
16232324232753.3878692562604.87643280511-648.5057198897760.426438434304928
17237192236619.7951583463218.62545272556178.3111815392680.774292654880965
18236727238311.6553647332473.9431491454-1106.97632942550-0.934477533450907
19240698239785.8745943821986.876142100771225.24823405856-0.613374915908075
20240688241610.5671889441907.76975114746-871.686006225396-0.0994716354603897
21245283244306.8943574682291.68662417526729.785055856760.483466684295873
22243556245259.7379136891639.14749308027-1285.03503799079-0.820104953725054
23247826246673.1157433891529.173844123591223.48490616425-0.138401057719906
24245798247302.3684370611090.58816800139-1222.71708360598-0.551613512587953
25250479249058.3532863011414.632833245101212.762220695870.407789110503336
26249216250462.9258003471409.73123856884-1243.78079086457-0.00616378383910533
27251896251009.246105002989.1784361211061156.60862949153-0.52911761446074
28247616250057.03427756443.3384024854603-1834.01172556649-1.18970800536626
29249994249202.121333231-394.1528392946721072.53393932131-0.550412172644179
30246552248002.276334087-786.640652953867-1198.46315895828-0.493658961900905
31248771247188.620236879-799.7993291111931590.82184838269-0.0165537198694503
32247551248161.92643514863.9342269878309-1165.116440079021.08647689789481
33249745248447.646702927171.9592869658261228.054517065070.135894324816302
34245742247586.468276386-331.291863425981-1521.60846938944-0.633021914959784
35249019247569.499834552-178.1910368431341351.282162489050.192593573910546
36245841247164.304510909-288.765448731972-1252.36481291801-0.139092154373678
37248771247168.396470154-146.1212565688311511.096331035720.179438389264937
38244723246571.440245203-365.720480239398-1707.56106426357-0.276233733695153
39246878245740.858205996-592.1460108763031282.39685633466-0.284827692172930
40246014246510.94874124271.3875458672191-922.6248127643080.834667887752284
41248496246803.954897304179.3337004533131622.796832302700.135788418324018
42244351246366.508090233-121.092671984742-1822.77901698428-0.377909849215498
43248016246717.387888836108.7967914997521151.135673449210.289183194615556
44246509247238.546209631309.652534835092-858.398719498760.252659775382279
45249426247649.624733798359.0553221955661744.682971119430.0621448194348233
46247840249127.567820517904.04897681852-1637.188625541510.685556226531153
47251035250017.681803927897.2614819336031021.67243713773-0.00853812376006289
48250161251013.288851379945.1640859416-883.0189866413960.0602575310043426
49254278252466.9847731631192.861150244981652.115408155450.311582885806666
50250801252896.363794556820.98122842145-1856.79866604542-0.467794233086307
51253985253242.64776461589.764290766845890.680008172866-0.290852093051691
52249174251477.009877241-557.51372822705-1567.01867943003-1.44318164656761
53251287249945.056688277-1032.146570738331646.42452347952-0.597049396448244
54247947249354.437514557-817.085868900304-1545.401125769650.270528704125709
55249992248589.953246446-791.4645215351741385.610425671760.0322295602262429
56243805246144.332072334-1597.17669878153-1822.45975495488-1.01351990485014
57255812250668.8927945721384.617788731043230.25898822483.75085346636858
58250417252114.6327303531414.38936376873-1716.731481538320.0374502009720471
59253033252233.897197885783.5559439985211203.78821063228-0.793536784997278
60248705252184.276552414377.729613412756-3218.93510955375-0.510496279468551
61253950251358.965626028-208.2510808320992966.94634505119-0.737115715825917
62251484252245.104472423324.80784031473-1103.066769072550.670544446038215
63251093250767.632863407-553.052013473135888.522283546821-1.10427577596664
64245996249405.437847183-947.171938567868-3156.60623958339-0.495770578870859
65252721249368.963667711-503.5864520880633067.472173956860.557994197731928
66248019248806.785549731-532.125464540649-769.477508439316-0.0358997394529611
67250464249012.097698266-172.9320629439111221.476435139470.451835867931494
68245571248899.736682055-143.42892803819-3347.663216151640.0371125265973846
69252690249312.794423238127.6263269359523203.321140236520.340965300935715
70250183250507.159023587647.216534960947-657.4809405097970.65360191076776
71253639251997.8561694531058.061692053991377.582885051490.516809543397047
72254436256164.3295357062572.11654074478-2699.609687537251.90455695061375
73265280261077.4325228393712.371495257873471.08343883721.43434730158373
74268705267906.3829715115230.40447943665-175.2151211304861.90956111585694
75270643271186.9145721184280.6543354536565.3588808731411-1.19470785988385
76271480274956.4023758524031.67374985382-3316.67903674716-0.31319717664437
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/1flfu1291823130.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/1flfu1291823130.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/2pcwx1291823130.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/2pcwx1291823130.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/30mdi1291823130.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/30mdi1291823130.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/40mdi1291823130.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/40mdi1291823130.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/50mdi1291823130.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918247105ulu57gexvf37ma/50mdi1291823130.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 4 ;
 
Parameters (R input):
par1 = 4 ; par2 = 4 ;
 
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