Home » date » 2008 » May » 22 »

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 22 May 2008 12:04:43 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9.htm/, Retrieved Thu, 22 May 2008 20:05:17 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12,23 12,25 12,33 12,37 12,38 12,41 12,41 12,41 12,43 12,44 12,46 12,46 12,46 12,47 12,55 12,58 12,6 12,62 12,62 12,66 12,7 12,76 12,79 12,81 12,86 13,03 13,09 13,15 13,17 13,18 13,18 13,19 13,19 13,19 13,25 13,24 13,3 13,35 13,35 13,35 13,36 13,37 13,38 13,39 13,4 13,4 13,44 13,44 13,44 13,47 13,52 13,58 13,65 13,66 13,68 13,68 13,77 13,78 13,79 13,79 13,82 13,86 13,94 14 14,02 14,03 14,07 14,1 14,1 14,16 14,17 14,17
 
Text written by user:
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
112.23NANA0.997399534356366NA
212.25NANA1.00035195171650NA
312.33NANA1.00194448072618NA
412.37NANA1.00266432985917NA
512.38NANA1.00279338979910NA
612.41NANA1.00163740479876NA
712.4112.391979718565512.391251.000058889826731.00145418906775
812.4112.398182182110912.410.9990477181394731.00095318956566
912.4312.421679786801512.42833333333330.9994646469197971.00066981385298
1012.4412.428935450603312.446250.9986088541209811.00089022502697
1112.4612.451976104202612.46416666666670.999021951263161.00064438734304
1212.4612.444722566553812.48208333333330.9970068484737821.00122762346565
1312.4612.467078596315312.49958333333330.9973995343563660.999432216917495
1412.4712.523155995551012.518751.000351951716500.99575538342173
1512.5512.564801265173312.54041666666671.001944480726180.998822005628188
1612.5812.598477304680412.5651.002664329859170.99853337000706
1712.612.627257930466112.59208333333331.002793389799100.997841342069976
1812.6212.64108139747912.62041666666671.001637404798760.998332310597793
1912.6212.652411721124512.65166666666671.000058889826730.997438296995157
2012.6612.679580622720112.69166666666670.9990477181394730.998455735776856
2112.712.730680940140912.73750.9994646469197970.997590000072645
2212.7612.765965938869112.783750.9986088541209810.999532668432795
2312.7912.818700412145412.831250.999021951263160.997761051337292
2412.8112.839786530261512.87833333333330.9970068484737820.99768013820235
2512.8612.891388981556012.9250.9973995343563660.997565120282932
2613.0312.974981627076312.97041666666671.000351951716501.00424034303131
2713.0913.038220032316413.01291666666671.001944480726181.00397139851569
2813.1513.086022835074413.051251.002664329859171.00488896937839
2913.1713.124894150153913.08833333333331.002793389799101.00343666389459
3013.1813.146908286902413.12541666666671.001637404798761.00251707187541
3113.1813.162441754936113.16166666666671.000058889826731.00133396564184
3213.1913.180769561320113.19333333333330.9990477181394731.00070029588462
3313.1913.210423970662413.21750.9994646469197970.998453950402517
3413.1913.218252532381413.23666666666670.9986088541209810.997862612148453
3513.2513.239954668261413.25291666666670.999021951263161.00075871345411
3613.2413.229034620686513.268750.9970068484737821.00082888733970
3713.313.250452813924313.2850.9973995343563661.00373928248125
3813.3513.306348211082413.30166666666671.000351951716501.00328052356854
3913.3513.344648052671913.318751.001944480726181.00040105571215
4013.3513.371782169084313.336251.002664329859170.998371034705107
4113.3613.390216567871513.35291666666671.002793389799100.997743384678031
4213.3713.391057404322113.36916666666671.001637404798760.998427502497652
4313.3813.384121475514413.38333333333331.000058889826730.999692062305177
4413.3913.381411644713113.39416666666670.9990477181394731.00064181235246
4513.413.399072922768513.406250.9994646469197971.00006918965490
4613.413.404243431461413.42291666666670.9986088541209810.99968342626101
4713.4413.431433875586813.44458333333330.999021951263161.00063776693483
4813.4413.428435990381313.468750.9970068484737821.00086115833795
4913.4413.458244383581913.49333333333330.9973995343563660.998644371207574
5013.4713.522674320641013.51791666666671.000351951716500.996104740867667
5113.5213.571755468303113.54541666666671.001944480726180.996186531033219
5213.5813.612839385054613.57666666666671.002664329859170.997587616798692
5313.6513.645093221112113.60708333333331.002793389799101.00035960024665
5413.6613.658578061187113.636251.001637404798761.00010410591839
5513.6813.667471494298613.66666666666671.000058889826731.00091666594707
5613.6813.685704928863113.698750.9990477181394730.999583146875316
5713.7713.725148263826113.73250.9994646469197971.00326785075919
5813.7813.748347399110613.76750.9986088541209811.00230228404699
5913.7913.786919186578013.80041666666670.999021951263161.00022345916302
6013.7913.78985097295313.831250.9970068484737821.00001080700925
6113.8213.826866628154413.86291666666670.9973995343563660.999503385087952
6213.8613.901557622353713.89666666666671.000351951716500.997010577988265
6313.9413.954999232180913.92791666666671.001944480726180.998925171407656
641413.994687384009313.95751.002664329859171.00037961662486
6514.0214.028243862131213.98916666666671.002793389799100.9994123382647
6614.0314.043791113115914.02083333333331.001637404798760.999017992150064
6714.07NANA1.00005888982673NA
6814.1NANA0.999047718139473NA
6914.1NANA0.999464646919797NA
7014.16NANA0.998608854120981NA
7114.17NANA0.99902195126316NA
7214.17NANA0.997006848473782NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/1bh1m1211479481.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/1bh1m1211479481.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/2ihu61211479481.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/2ihu61211479481.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/3at7r1211479481.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/3at7r1211479481.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/4rcr01211479481.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/22/t12114795128ebwy4qo7qa8ld9/4rcr01211479481.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 12 ;
 
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observations',header=TRUE)
a<-table.element(a,'Fit',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Random',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(m$trend)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
if (par1 == 'additive') a<-table.element(a,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[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