Re: [R] loop problem for extract coefficients

2009-04-07 Thread Arien Lam
Hi Alex, On Sun, April 5, 2009 16:49, Alex Roy wrote: > Dear R users, > I have problem with extracting coefficients from a > object. Here, X (predictor)and Y (response) are two matrix , I am > regressing > X ( dimensions 10 x 20) on each of columns of Y[,1] (10 x 1) and want

Re: [R] loop problem for extract coefficients

2009-04-05 Thread Bill.Venables
Perhaps your loop should be more than just a print statement. That works fine! You need to place the print statement after the '{', not before it. fit$coefficients is a 21 x 20 array (the rows are lablelled 0 to 20) and you are trying to put it in the jth *column* of a 20 x 20 matrix. Not sur