Test for differences in multiple proportions. The flocks problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Test for differences in multiple proportions. The flocks problem

AR-4
Dear list.
    I'd like to know what test to use.
I have the number of  births in a flock for each month of the year. And
also obviously, if I sum all I have the total number of birth in a year
of that flock, we can call Flock A.
I have the same data for flock B.

I'd like to demo that exists season (effect) ('estacionalidad' in
spanish) dependency for the birth, in each flock.
Also I'd like to see if there are deferences in the season thing between
the two flocks.

Data for: January, February,.....Nov, December
    Flock A: 81,104,110,68,45,68,103,161,174,188,149,113, Total: 1364
    Flock B: 43,33,28,56,38,34,16,28,122,152,90,98,  Total: 738


(1st test) To check for season effect in each Flock what i think I must
do is to build a contingency table over the total of births something
like that:

Variables: Birth (yes/no) and Month.
Month:   |  1           | 2       |  3..
birth       | 81          | 104   | 110 ..
no-birth  |1364-81 | 1260 |  1254 ..... etc.


(2nd test) The same with the too flocks together (variables : Flock, Month)
Month    |1   | 2 | ..
folck A   |81 | 104 |..
folck B   |43 | 3 3|..

    The problem is that even if this method is correct I do not know
where (in which month) are the deviations (dependences).
And if I get a significant chi square in the 1st test (one flock), when
i do the 2nd test I do not know if the significance is for that
dependence in the one flock test or for differences in distribution of
probabilities of the two flock.

I also thought of doing multiple confidence intervals, one for each
month and folks, but then I think I do type alpha (I) error. the same if
i compute confidence intervals for difference of proportions.

Any help would be very much appreciated

AR.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Test for differences in multiple proportions. The flocks problem

Ornelas, Fermin-2
For the first question it seems that you want to test whether the
population distributions are the same or not. This could be tackled with
a sample proportion test and since the samples are large enough you
could use the standard normal approximation for the test. Ho:
p1_hat=p2_hat vs. Ha: not Ho.

Note that you could answer this question using the Chi-square test where
you build actual and expected contingency tables to calculate the X^2
test as the sum of (actual -expected)^2/expected values. You would
reject Ho if your calculated value > table value (alpha=.05, 1 d.f.) and
conclude that the populations have different distributions.


Fermin Ornelas, Ph.D.
Management Analyst III, AZ DES
1789 W. Jefferson Street
Phoenix, AZ 85032
Tel: (602) 542-5639
E-mail: [hidden email]


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
AR
Sent: Thursday, November 15, 2007 2:38 AM
To: [hidden email]
Subject: Test for differences in multiple proportions. The flocks
problem

Dear list.
    I'd like to know what test to use.
I have the number of  births in a flock for each month of the year. And
also obviously, if I sum all I have the total number of birth in a year
of that flock, we can call Flock A.
I have the same data for flock B.

I'd like to demo that exists season (effect) ('estacionalidad' in
spanish) dependency for the birth, in each flock.
Also I'd like to see if there are deferences in the season thing between
the two flocks.

Data for: January, February,.....Nov, December
    Flock A: 81,104,110,68,45,68,103,161,174,188,149,113, Total: 1364
    Flock B: 43,33,28,56,38,34,16,28,122,152,90,98,  Total: 738


(1st test) To check for season effect in each Flock what i think I must
do is to build a contingency table over the total of births something
like that:

Variables: Birth (yes/no) and Month.
Month:   |  1           | 2       |  3..
birth       | 81          | 104   | 110 ..
no-birth  |1364-81 | 1260 |  1254 ..... etc.


(2nd test) The same with the too flocks together (variables : Flock,
Month)
Month    |1   | 2 | ..
folck A   |81 | 104 |..
folck B   |43 | 3 3|..

    The problem is that even if this method is correct I do not know
where (in which month) are the deviations (dependences).
And if I get a significant chi square in the 1st test (one flock), when
i do the 2nd test I do not know if the significance is for that
dependence in the one flock test or for differences in distribution of
probabilities of the two flock.

I also thought of doing multiple confidence intervals, one for each
month and folks, but then I think I do type alpha (I) error. the same if
i compute confidence intervals for difference of proportions.

Any help would be very much appreciated

AR.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

NOTICE: This e-mail (and any attachments) may contain PRIVILEGED OR
CONFIDENTIAL information and is intended only for the use of the
specific individual(s) to whom it is addressed.  It may contain
information that is privileged and confidential under state and federal
law.  This information may be used or disclosed only in accordance with
law, and you may be subject to penalties under law for improper use or
further disclosure of the information in this e-mail and its
attachments. If you have received this e-mail in error, please
immediately notify the person named above by reply e-mail, and then
delete the original e-mail.  Thank you.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Test for differences in multiple proportions. The flocks problem

ViAnn Beadle
In reply to this post by AR-4
If you have the Trends Option, you can perform a seasonal decomposition with
the SEASON command.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of AR
Sent: Thursday, November 15, 2007 2:38 AM
To: [hidden email]
Subject: Test for differences in multiple proportions. The flocks problem

Dear list.
    I'd like to know what test to use.
I have the number of  births in a flock for each month of the year. And
also obviously, if I sum all I have the total number of birth in a year
of that flock, we can call Flock A.
I have the same data for flock B.

I'd like to demo that exists season (effect) ('estacionalidad' in
spanish) dependency for the birth, in each flock.
Also I'd like to see if there are deferences in the season thing between
the two flocks.

Data for: January, February,.....Nov, December
    Flock A: 81,104,110,68,45,68,103,161,174,188,149,113, Total: 1364
    Flock B: 43,33,28,56,38,34,16,28,122,152,90,98,  Total: 738


(1st test) To check for season effect in each Flock what i think I must
do is to build a contingency table over the total of births something
like that:

Variables: Birth (yes/no) and Month.
Month:   |  1           | 2       |  3..
birth       | 81          | 104   | 110 ..
no-birth  |1364-81 | 1260 |  1254 ..... etc.


(2nd test) The same with the too flocks together (variables : Flock, Month)
Month    |1   | 2 | ..
folck A   |81 | 104 |..
folck B   |43 | 3 3|..

    The problem is that even if this method is correct I do not know
where (in which month) are the deviations (dependences).
And if I get a significant chi square in the 1st test (one flock), when
i do the 2nd test I do not know if the significance is for that
dependence in the one flock test or for differences in distribution of
probabilities of the two flock.

I also thought of doing multiple confidence intervals, one for each
month and folks, but then I think I do type alpha (I) error. the same if
i compute confidence intervals for difference of proportions.

Any help would be very much appreciated

AR.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Test for differences in multiple proportions. The flocks problem

Ornelas, Fermin-2
In reply to this post by AR-4
I am thinking that for the second part you may be able to use the
Ansari-Bradley test which is a test of dispersion, but under the
assumption that the two populations have the same median and similar
distributions (which you may get if you fail to reject Ho under the
first test).

 

Fermin Ornelas, Ph.D.

Management Analyst III, AZ DES

1789 W. Jefferson Street

Phoenix, AZ 85032

Tel: (602) 542-5639

E-mail: [hidden email]
   
NOTICE: This e-mail (and any attachments) may contain PRIVILEGED OR CONFIDENTIAL information and is intended only for the use of the specific individual(s) to whom it is addressed.  It may contain information that is privileged and confidential under state and federal law.  This information may be used or disclosed only in accordance with law, and you may be subject to penalties under law for improper use or further disclosure of the information in this e-mail and its attachments. If you have received this e-mail in error, please immediately notify the person named above by reply e-mail, and then delete the original e-mail.  Thank you.

====================To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Test for differences in multiple proportions. The flocks problem

Richard Ristow
In reply to this post by AR-4
At 04:37 AM 11/15/2007, AR wrote:

>I have the number of  births in a flock for each month of the year
>[in a flock that] we can call Flock A. I have the same data for flock B.
>
>I'd like to demo that exists season (effect) ('estacionalidad' in
>spanish) dependency for the birth, in each flock. Also I'd like to
>see if there are deferences in the season thing between the two flocks.

When you've got a lot of cells and a theoretical hypothesis
(seasonality) for how the cell sizes might vary, it's well worth
considering a contrast analysis.

You have,

>Data for: January, February,.....Nov, December
>    Flock A: 81,104,110,68,45,68,103,161,174,188,149,113, Total: 1364
>    Flock B: 43,33,28,56,38,34,16,28,122,152,90,98,  Total: 738
>
>(1st test) To check for season effect in each Flock what i think I
>must do is to build a contingency table over the total of births
>something like that:

Another approach: Your cell sizes look plenty high enough to consider
the cell counts as interval measures. (The hypothesis of equal
variance won't hold, but I'll intuitively guess the difference isn't
big enough to hurt the analysis too badly. Or, estimate the standard
deviation of each count as the square root of the observed count.)

Then, I'd run a multiple regression with *sinusoidal* contrasts. That is, if
. Month number is m,m=1,12.;
. FA and FB are indicator variables for flocks A and B;
. NA and NB are sizes (not total births) of flocks A and B

Then, let your dependent variable (this is ONE variable) be
. b(i,m) be the observed births in flock i in month m

Then, take as dependent variable (this is ONE variable),
- b(A,m)/NA
- b(B,m)/NB

Take as independent variables
SA = sin(m/24*pi)
CA = cos(m/24*pi)
FB = (indicator variable for flock B)
SB = S*FB
CB = C*FB

(The formulae for S and C assume that sin and cos take arguments in
radians; SPSS's SIN and COS functions do. Whatever form of sin and
cos you have, adjust the arguments so the resulting variable has period 12.)

If you include either a sin or cosine term, you must include the other.

The estimated constant is the *crude birth rate* in flock A; the
constant plus the coefficient of F2 is the crude birth rate in flock B.

The F-test for significance of SB and CB combined tests the null
hypothesis that seasonality differs, in amplitude or time of peak,
between the two flocks.

There are possible variations in this model, since your N isn't too bad:

. Include m and m*F in the model. This is called having a 'trend
term' in addition to the seasonality terms. You may have theoretical
reasons for including this; in the absence of strong theoretical
reasons, though, there's good cause to include a test for a trend.

. Include sin and cos terms with periods 12 months, as well. That
will start testing for seasonality effects that don't follow a pure
sine curve. I note the big drop-off in births in April in flock A.

-Good luck,
  Richard

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD