[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GLM factorial analysis
From: |
John Darrington |
Subject: |
Re: GLM factorial analysis |
Date: |
Sat, 13 Aug 2011 17:28:48 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Aug 12, 2011 at 05:37:20PM -0400, Jason Stover wrote:
I looked into this problem. Briefly stated, this happens because the
meaning of "type 3 sums of squares" changes in the presence of
interactions. The fix should be simple enough, but requires get_ssq
to know which variables, if any, went into an interaction. Is there an
easy way to do this?
Yes.
struct interaction which is defined in src/math/interaction.h is a transparent
struct defined as follows:
struct interaction
{
size_t n_vars;
const struct variable **vars;
};
So it's easy to add a function which checks if a variable is a member of an
interaction.
Perhaps in the future, we should change the implementation of interactions to
use a hash
table, so that looking up a variable can be done in constant time. However for
now, a
linear search should do.
J'
-Jason
>
> J'
>
> On Mon, Jul 25, 2011 at 02:29:07PM -0400, Jason Stover wrote:
> On Mon, Jul 25, 2011 at 09:11:21AM +0000, John Darrington wrote:
> > The sum of squares for factors with interactions are correct, and
all the degrees of
> > freedome are correct. Unfortunately the ssq for factors without
interactions are
> > wrong (my experiments showed 3.0 and 3.5 times too high) if the
analysis also
> > includes interactions between those factors.
> >
> > However, if the analysis is run on the individual variables,
without the interactions,
> > then the results are correct.
> >
> > So I think the get_ssq function needs some more work.
>
> Can you send syntax and output that shows the problems?
>
> --
> PGP Public key ID: 1024D/2DE827B3
> fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
> See http://pgp.mit.edu or any PGP keyserver for public key.
>
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature