[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: type 3 sums of squares

From: John Darrington
Subject: Re: type 3 sums of squares
Date: Sat, 1 Jan 2011 14:03:06 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

If I understand correctly, the sums of squares is not a single scalar.
Instead we require a value for each factor.  So the result needs to be an
array or a matrix.

I was envisaging a function with a signature similar to

 void type3ssq (gsl_matrix *cov, const struct categoricals *x);

which would mutate cov, placing the ssqs in elements of the matrix.

Note that "struct categoricals" contains both "vars" and "n_vars".

GLM will, at some stage, require to support interactions.  I think there 
is a relatively straightforward extention to "struct categoricals" which
will make it support interactions.  So if GLM can be implemented in terms
of it, that will make our lives a lot easier later.

To answer your specific question, I suggest that the function lives outside 
of glm.c since there are a number of other potential commands which perform
similar function.


On Fri, Dec 31, 2010 at 05:01:12PM -0500, Jason Stover wrote:
     I am getting around to coding type 3 sums of squares. I think
     the easiest approach is to put a function in linreg.c whose call
     would be something like
     ssq = linreg_type3_ssq (cov, vars, n_vars, l);
     Where l is a linreg struct, and the other args are what they seem to
     My question is: Should this be something in glm.c, so as to avoid use
     of linreg.c by glm.c? Or should glm.c depend on linreg.c?
     I think using linreg.c would hide a lot details about computation of
     type 3 sums of squares. On the other hand, it would necessitate
     creating a linreg struct. But then again, having a linreg struct may
     be useful if PSPP ever gets to a point where one procedure can use
     data structures from previously called procedures. 
     pspp-dev mailing list

PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]