[R] function

From: <n.vialma_at_libero.it>
Date: Thu, 03 Jun 2010 15:20:36 +0200 (CEST)

Dear list,

I would like to ask you a question. I'm trying to build the time series' production with the Divisia index. The final step would require to do the following calculations:

a)PROD(2006)=PROD(2007)/[1+DELTA_PROD(2007)/100]
b)PROD(2005)=PROD(2006)/[1+DELTA_PROD(2006)/100]
c)PROD(2004)=PROD(2005)/[1+DELTA_PROD(2005)/100]
my question is how can I tell R to take the value generated in the previous step (for example is the case of the produciton of 2005 that need the value of the production of 2006) in order to generate the time series production?? I have the value of the following variables: prod(2007)=2
delta_prod(2007)=3

delta_prod(2006)=5
delta_prod(2005)=4
What i would like to do is
prod(2006)=2/(1+3/100) which is equal to 1.95 prod(2005)=1.95/(1+5/100)
and so on...

(PS:my data.frame is not set as a time series) Thanks for your attention!!

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 03 Jun 2010 - 13:23:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Jun 2010 - 13:50:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive