Re: [R] Create matrices for time series

2011-04-18 Thread mathijsdevaan
Thanks a lot! Given the calculations below, I would like to generate a data.frame in which the value of case 8029 (i) in 1998 = sum (element c(i,j) * element final1(1,j) * 1st eigenvalue 1998 * element final2 (i,j)) * (1/sum final2(i)) in which j are all other cases in year 1998 and i IS NOT j? so

Re: [R] Create matrices for time series

2011-04-14 Thread Gabor Grothendieck
On Thu, Apr 14, 2011 at 3:51 AM, mathijsdevaan wrote: > Hi list, I would like to use the following data.frame to generate matrices > over a 3 year moving window: > > DF = data.frame(read.table(textConnection("  A  B  C > 80  8025  1995 > 80  8026  1995 > 80  8029  1995 > 81  8026  1996 > 82  8025

[R] Create matrices for time series

2011-04-14 Thread mathijsdevaan
Hi list, I would like to use the following data.frame to generate matrices over a 3 year moving window: DF = data.frame(read.table(textConnection(" A B C 80 8025 1995 80 8026 1995 80 8029 1995 81 8026 1996 82 8025 1997 82 8026 1997 83 8025 1997 83 8027 1997 84 8026 1999 84 80