Re: unequal n's: quadratic weights

2001-01-31 Thread Donald Burrill

On Tue, 30 Jan 2001, Kathleen Bloom wrote:

 If you have unequal n's, and want to determine linear parameters, you can
 develop new coefficients by taking the normal unweighted coefficients
 (e.g., -1, 0, +1, for three group design) and the formula:
  n1(X1) + n2(X2) + n3(X3)/ n1+n2+n3   where the X's are 1, 2, and 3
 because you have 3 groups.  This gives you a new mean of the Xs... (i.e., no
 longer 1+2+3/3 = 2), and from there you calculate the new coefficients
 (e.g., 1 - ?, 2 - ?, 3 - ?, gives you the new linear coefficients) for the
 3-group design with unequal n's. 

You get the same results if you use X's corresponding to the unweighted 
coefficients (-1, 0, +1).  I should suppose that for quadratic estimates 
you'd play the same game with the quadratic unweighted coefficients 
 (+1, -2, +1).  However, I've never played around much with weighted 
trend analyses, so my supposition may possibly be incorrect.  It may be 
better to retain the grand mean calculated from (-1,0,+1), equal to your 
"?" minus 2 (let's call that ""), and generate coefficients from the 
unweighted quadratic coefficients as  1-, -2-, 1-.

I note in passing that your decision to pursue weighting-by-sample-size 
implies that you have decided to assign equal weight to individual cases 
and NOT to assign equal weight to each subgroup.  (Had you chosen equal 
weight for each subgroup, you'd use the "unweighted" (they're not really 
UNweighted, they're _equally_ weighted) coefficients directly.)  I've not 
encountered situations where it seemed necessary to give equal importance 
to each individual case, enough to make it worth the extra effort to 
weight the coefficients -- and think about what it means, that the "grand 
mean" for the data depends on which trend you're currently pursuing, and 
that the several trends (linear, quadratic, cubic, ...) are explicitly 
NOT orthogonal.

 From there you can do things like determine
 the the weighted linear estimated parameters.  They are given in the spss
 oneway printout... as I understand it... i.e., the weighted (for sample
 size) beta for the linear contrast.

Notice that all this does is change the distance between each group mean 
and the grand mean;  it does not change the relative distances between 
groups, which are still equally spaced.  It has never been very clear to 
me what advantage one gets from the weighted parameters, especially as 
those estimates depend on the accident of how many observations you were 
able to find for each group.  For this reason (among others) I am 
inclined to favor equal weighting in general.  If it turns out that the 
choice of weighting influences the conclusion(s) to be drawn, one has 
compelling arguments for repeating the experiment, this time with a 
proper (equal-numbers-of-cases) design and carefully random selection of 
cases.

  snip  

 ...  My means are 2.05, 6.38, and 12.08 for the three groups 
 respectively. In other words.. what does one calculate and how?

You might reasonably try using the regression module (rather than one-way 
anova) to compare output:  predict Y from X1 (X1 = 1,2,3 for the three 
groups, and X1 = -1,0,+1 if you want to confirm that the results are the 
same for this coding);  and for an alternate (quadratic) model, predict 
 Y from  X1 and X2 (X1 = -1,0,+1;  X2 = +1,-2,+1).

You have not, by the way, said what you're doing this analysis FOR, so 
it's a bit difficult to know whether one is offering useful advice.  Or 
not. 
-- Don.
 --
 Donald F. Burrill[EMAIL PROTECTED]
 348 Hyde Hall, Plymouth State College,  [EMAIL PROTECTED]
 MSC #29, Plymouth, NH 03264 (603) 535-2597
 Department of Mathematics, Boston University[EMAIL PROTECTED]
 111 Cummington Street, room 261, Boston, MA 02215   (617) 353-5288
 184 Nashua Road, Bedford, NH 03110  (603) 471-7128



=
Instructions for joining and leaving this list and remarks about
the problem of INAPPROPRIATE MESSAGES are available at
  http://jse.stat.ncsu.edu/
=



Re: unequal n's: quadratic weights

2001-01-31 Thread Duncan Murdoch

Serve me right for not checking my work.  Here's a correction:

On Wed, 31 Jan 2001 12:37:13 GMT, [EMAIL PROTECTED] (Duncan Murdoch)
wrote:

To find it, do this.  Suppose the quadratic curve is A x^2 + B x + C.
Then you've got three equations:

 A (-1)^2 + B (-1) + C = 2.05
 A (0)^2 + B (0) + C = 6.38
 A (1)^2 + B (1) + C = 12.08

There's a unique solution to these equations; it is C = 6.38, A =
(12.08+2.05)/2-C, B = (12.08-2.05)/2-C.Those are the least-squares
parameter estimates.

Duncan Murdoch


=
Instructions for joining and leaving this list and remarks about
the problem of INAPPROPRIATE MESSAGES are available at
  http://jse.stat.ncsu.edu/
=



Re: unequal n's: quadratic weights

2001-01-31 Thread Duncan Murdoch

On Tue, 30 Jan 2001 23:22:51 -0500, "K. Bloom" [EMAIL PROTECTED]
wrote:
If your answer IS the correct answer
to my question, perhaps you would kindly explain it to me in a more concrete
way suitable to my simple knowledge of the problem.  My means are 2.05,
6.38, and 12.08 for the three groups respectively. In other words.. what
does one calculate and how?

I'm still not sure I understand your question completely, but what I
think you're asking is this:

You have 3 groups of observations.  You'd graph them with
x-coordinates equal to -1, 0 and +1.  The y-coordinates would be the
observed data.  

The means for those three groups are 2.05, 6.38, and 12.08, based on
different numbers of observations in each group.

You want the quadratic curve that provides the least-squares fit to
your data.

If that's the case, then the numbers of observations in each group
doesn't matter.  There's a quadratic curve that goes exactly through
each group mean, and you can't find a better fit than that.

To find it, do this.  Suppose the quadratic curve is A x^2 + B x + C.
Then you've got three equations:

 A (-1)^2 + B (-1) + C = 2.05
 A (0)^2 + B (0) + C = 6.38
 A (1)^2 + B (1) + C = 12.08

There's a unique solution to these equations; it is C = 6.38, A =
(12.08+2.05)/2, B = (12.08-2.05)/2.Those are the least-squares
parameter estimates.

If you have more than three groups, then you won't be able to find an
exact solution like this (you've only got three parameters to play
with), and then the least-squares solution *does* depend on the group
sizes.

In general, you should solve linear least-squares problems using
"multiple linear regression"; there are a ton of texts on that and I'd
suggest you use one of those.  In particular, with unequal group sizes
you probably want to use "weighted least squares", with the weights
equal to the group sizes.

Duncan Murdoch


=
Instructions for joining and leaving this list and remarks about
the problem of INAPPROPRIATE MESSAGES are available at
  http://jse.stat.ncsu.edu/
=



unequal n's: quadratic weights

2001-01-30 Thread K. Bloom

Could someone please tell me how to calculate quadratic coefficients for
unequal sample sizes (equal intervals, three groups)? The formula is not in
the SPSS algorithm notes.

Thank you, Kathleen Bloom




=
Instructions for joining and leaving this list and remarks about
the problem of INAPPROPRIATE MESSAGES are available at
  http://jse.stat.ncsu.edu/
=



Re: unequal n's: quadratic weights

2001-01-30 Thread Duncan Murdoch

On Tue, 30 Jan 2001 19:53:03 -0500, "K. Bloom" [EMAIL PROTECTED]
wrote:

Could someone please tell me how to calculate quadratic coefficients for
unequal sample sizes (equal intervals, three groups)? The formula is not in
the SPSS algorithm notes.

Maybe I'm misunderstanding the question, but if you only have 3
groups, your estimates will interpolate the group means.  Just solve
the 3 linear equations in 3 unknowns, using whatever equation solving
method you like.

Duncan Murdoch






=
Instructions for joining and leaving this list and remarks about
the problem of INAPPROPRIATE MESSAGES are available at
  http://jse.stat.ncsu.edu/
=



Re: unequal n's: quadratic weights

2001-01-30 Thread K. Bloom

I don't understand your reply... sorry.  I'll try again.  This may be a
self-evident solution for you, but I'll need a simple and concrete example.
Here is where I am right now:

If you have unequal n's, and want to determine linear parameters, you can
develop new coefficients by taking the normal unweighted coefficients
(e.g., -1, 0, +1, for three group design) and the formula:
 n1(X1) + n2(X2) + n3(X3)/ n1+n2+n3   where the X's are 1, 2, and 3
because you have 3 groups.  This gives you a new mean of the Xs... (i.e., no
longer 1+2+3/3 = 2), and from there you calculate the new coefficients
(e.g., 1 - ?, 2 - ?, 3 - ?, gives you the new linear coefficients) for the
3-group design with unequal n's. From there you can do things like determine
the the weighted linear estimated parameters.  They are given in the spss
oneway printout... as I understand it... i.e., the weighted (for sample
size) beta for the linear contrast.
I calculated and checked this value with a data set in which the n's were
247, 29, and 37, for X1, X2, and X3 respectively.  It worked. Now I want to
calculate the weighted quadratic beta for this data set.  To do this I need
a formula.. for weighting... as above... but that  formula above does not
work  for the quadratic parameter because it is for a linear not a quadratic
trend. One text referred to a 1965 article by Gaito...for determining the
coefficients, but I don't have access to that paper at this moment.  So I
asked, does anyone know this formula?  If your answer IS the correct answer
to my question, perhaps you would kindly explain it to me in a more concrete
way suitable to my simple knowledge of the problem.  My means are 2.05,
6.38, and 12.08 for the three groups respectively. In other words.. what
does one calculate and how?

Many thanks.



Duncan Murdoch [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Tue, 30 Jan 2001 19:53:03 -0500, "K. Bloom" [EMAIL PROTECTED]
 wrote:

 Could someone please tell me how to calculate quadratic coefficients for
 unequal sample sizes (equal intervals, three groups)? The formula is not
in
 the SPSS algorithm notes.

 Maybe I'm misunderstanding the question, but if you only have 3
 groups, your estimates will interpolate the group means.  Just solve
 the 3 linear equations in 3 unknowns, using whatever equation solving
 method you like.

 Duncan Murdoch








=
Instructions for joining and leaving this list and remarks about
the problem of INAPPROPRIATE MESSAGES are available at
  http://jse.stat.ncsu.edu/
=