search for: 2by1

Displaying 1 result from an estimated 1 matches for "2by1".

Did you mean: 2b1
2001 Nov 12
3
'subscript out of bounds' in matrices
Dear list Having read through all the archives of the mailing lists, I've had no luck finding the answer to my problem. I am running a for(i in 1:n) loop and am creating a matrix, p, for each of the n observations. This matrix p is a 2x1 matrix. I am then doing the following: diagp<-diag(c(p[1,1],p[2,1])) to create a matrix with the elements of P on the diagonal (i.e. a 4x4 matrix).