[Gretl-users] pre-multiplication by transpose

2012-12-08 Thread Stefano Fachin
PS I am using 1.9.9CVS under windows XP

[Gretl-users] pre-multiplication by transpose

2012-12-08 Thread Stefano Fachin
remaining faithful to my lazy approach :-) I add to the discussion rather than checking in other environments. Explaining how I discovered the point may help: I was trying to generalise a script written by somebody else for cases when both matrices involved were bound to be non-scalars, to inclu

Re: [Gretl-users] pre-multiplication by transpose

2012-12-08 Thread Allin Cottrell
On Sat, 8 Dec 2012, Riccardo (Jack) Lucchetti wrote: > On Fri, 7 Dec 2012, Allin Cottrell wrote: > >> In fact, although we could go either way in terms of resolving the >> inconsistency of treatment of X'Y and X'*Y, for X or Y 1x1 and not >> strictly conformable with the other operand, it would be

Re: [Gretl-users] pre-multiplication by transpose

2012-12-08 Thread Jack
On Fri, 7 Dec 2012, Allin Cottrell wrote: > In fact, although we could go either way in terms of resolving the > inconsistency of treatment of X'Y and X'*Y, for X or Y 1x1 and not > strictly conformable with the other operand, it would be easier (I > think) to make the latter operation reduce to t

Re: [Gretl-users] pre-multiplication by transpose

2012-12-08 Thread Sven Schreiber
On 12/07/2012 11:08 PM, Allin Cottrell wrote: > On Fri, 7 Dec 2012, Sven Schreiber wrote: > >> On 12/07/2012 08:31 PM, Alan G Isaac wrote: >>> On 12/7/2012 1:52 PM, Summers, Peter wrote: But your example holds true whether or not we write x'y or x'*y >>> >>> >>> Absolutely. I was addressing

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Sven Schreiber
On 12/07/2012 08:31 PM, Alan G Isaac wrote: > On 12/7/2012 1:52 PM, Summers, Peter wrote: >> But your example holds true whether or not we write x'y or x'*y > > > Absolutely. I was addressing only the issue of > how to handle a 1 x 1 matrix, not the core question. > > I agree that many matrix p

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Allin Cottrell
On Sat, 8 Dec 2012, Sven Schreiber wrote: > On 12/07/2012 11:08 PM, Allin Cottrell wrote: >> On Fri, 7 Dec 2012, Sven Schreiber wrote: >> >>> On 12/07/2012 08:31 PM, Alan G Isaac wrote: On 12/7/2012 1:52 PM, Summers, Peter wrote: > But your example holds true whether or not we write x'y o

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Summers , Peter
1x1 matrix. Are you suggesting that both treatments should give an error? I'm willing to be persuaded, but that is inconsistent with other languages. -Original Message- From: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-bounces(a)lists.wfu.edu] On Behalf Of

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Summers , Peter
sers-bounces(a)lists.wfu.edu [mailto:gretl-users-bounces(a)lists.wfu.edu] On Behalf Of Alan G Isaac Sent: Friday, December 07, 2012 12:48 PM To: Gretl list Subject: Re: [Gretl-users] pre-multiplication by transpose On 12/7/2012 12:25 PM, Summers, Peter wrote: > I'd argue that a 1x1 matrix

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Summers , Peter
produce the identical result (6*I(3)). Matlab doesn't allow the x'y operation -- only x'*y. PS -Original Message- From: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-bounces(a)lists.wfu.edu] On Behalf Of Allin Cottrell Sent: Friday, December 07, 2012 11:

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Allin Cottrell
On Fri, 7 Dec 2012, Sven Schreiber wrote: > On 12/07/2012 08:31 PM, Alan G Isaac wrote: >> On 12/7/2012 1:52 PM, Summers, Peter wrote: >>> But your example holds true whether or not we write x'y or x'*y >> >> >> Absolutely. I was addressing only the issue of >> how to handle a 1 x 1 matrix, not t

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Alan G Isaac
On 12/7/2012 1:52 PM, Summers, Peter wrote: > But your example holds true whether or not we write x'y or x'*y Absolutely. I was addressing only the issue of how to handle a 1 x 1 matrix, not the core question. I agree that many matrix programming languages special case the 1x1 matrix. I guess

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Alan G Isaac
On 12/7/2012 12:58 PM, Summers, Peter wrote: > But associativity assumes all products are well-defined. A*(B*C) in your > example generates an error because B*C fails. Indeed. That is the point of the example.

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Alan G Isaac
On 12/7/2012 12:25 PM, Summers, Peter wrote: > I'd argue that a 1x1 matrix should be treated as a scalar in any computations So what is "right" is what is clearly wrong? E.g., (1x2)*((2x1)*(2x2)) -> error (as it should be) but ((1x2)*(2x1))*(2x2) -> (2x2) So much for associativity. Alan Isaac

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Sven Schreiber
Am 07.12.2012 12:22, schrieb Stefano Fachin: > I bumped into a feature of Hansl that may be produce puzzling results: > using the "pre-multiplication by transpose" notation X'Y with X a 1x1 > matrix (that is, defined as a matrix, but with 1 row and 1 column, for > instance because the result of the

[Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Stefano Fachin
I bumped into a feature of Hansl that may be produce puzzling results: using the "pre-multiplication by transpose" notation X'Y with X a 1x1 matrix (that is, defined as a matrix, but with 1 row and 1 column, for instance because the result of the product of a row vector for a column vector) pro

Re: [Gretl-users] pre-multiplication by transpose

2012-12-07 Thread Allin Cottrell
On Fri, 7 Dec 2012, Sven Schreiber wrote: > Am 07.12.2012 12:22, schrieb Stefano Fachin: >> I bumped into a feature of Hansl that may be produce puzzling results: >> using the "pre-multiplication by transpose" notation X'Y with X a 1x1 >> matrix (that is, defined as a matrix, but with 1 row and 1