Skip to content
Prev 227174 / 398500 Next

eval and assign in loop problem

On Jul 12, 2010, at 7:16 AM, S.Nicholas wrote:

            
Loops methods:

  b0 <- rnorm(10)
  b1 <- c(0,b0[2:(length(b0)-1)] ) # shifted one time interval
  ?lag
  ?diff

See also section 4 (page 9) of this exposition for worked examples of  
using R for discrete-time difference equations:

http://www.soa.org/files/pdf/UsingRforActuarialScience.pdf