[R] proportional matrix rows
Robin Hankin
r.hankin at soc.soton.ac.uk
Tue Feb 8 09:48:44 CET 2005
Hi Peter, Gabor
On Feb 7, 2005, at 04:42 pm, Peter Dalgaard wrote:
> Gabor Grothendieck <ggrothendieck at myway.com> writes:
>
>> Robin Hankin <r.hankin <at> soc.soton.ac.uk> writes:
>> : I want a diagnostic that detects whether a row is a multiple of
>> : the first row or not.
> ..and in that case it might be easier just to calculate the dot
> product with the orthogonal of mat[1,]:
>
>> z <- jj[1,]
>> jj %*% c(z[1], -z[2])
> [,1]
> [1,] 0
> [2,] 0
> [3,] 1
> [4,] 1
> [5,] 1
> [6,] 1
> [7,] 1
> [8,] 0
> [9,] 1
> [10,] 1
>
> (Notice that the value "1" just comes from Robin being singularly bad
> at selecting "arbitrary" rows that are not proportional to the first
> one!)
>
Heh. I spent some considerable time pondering this and realized that
if one
views jj as a bunch of two-by two matrices jj[c(a,b),] then in my
application,
many of these matrices are either singular or unimodular (that is, a
matrix with a
determinant of one).
Your insight above is is VERY VERY helpful
Thank you.
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
More information about the R-help
mailing list