Login  Register

Re: How can I calculate the P values in 6 X 6 contigency table

Posted by Ryan on May 08, 2013; 1:33am
URL: http://spssx-discussion.165.s1.nabble.com/How-can-I-calculate-the-P-values-in-6-X-6-contigency-table-tp5719892p5720057.html

One could obtain the likelihood Ratio Tests by employing GENLIN before VARSTOCASES, as shown below. -Ryan

compute total=sum(kount1,kount2).
execute.

split file by row.

GENLIN kount1 OF total BY col (ORDER=ASCENDING)
  /MODEL col INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT SUMMARY.
 
split file off.

 
 
 

 
 


On Tue, May 7, 2013 at 2:32 PM, Bruce Weaver <[hidden email]> wrote:
It looks to me like six separate 5x2 (or 2x5) tables, as Rich Ulrich
observed.  If that is correct, then one could do something like this to get
a chi-square for each 5x2 table:

new file.
dataset close all.

data list list / row col (2f1) kount1 (f5.0) pct (f5.1).
begin data
1 1 237  98.3
1 2 263  97.0
1 3 257  94.1
1 4 233  97.1
1 5  83  92.2
2 1 223  92.1
2 2 237  87.1
2 3 224  81.8
2 4 201  83.8
2 5  78  84.8
3 1 222  91.4
3 2 247  90.5
3 3 229  83.0
3 4 211  88.3
3 5  72  78.3
4 1 217  89.3
4 2 234  85.7
4 3 214  77.5
4 4 207  86.6
4 5  68  74.7
5 1 224  92.2
5 2 248  90.8
5 3 236  85.5
5 4 217  90.8
5 5  77  83.7
6 1 223  92.1
6 2 247  90.5
6 3 230  83.6
6 4 214  89.5
6 5  76  82.6
end data.

compute kount2 = rnd(kount1*100 / pct) - kount1.
formats kount2 (f5.0).
list.

VARSTOCASES
  /MAKE kount FROM kount1 kount2
  /INDEX=Y(2)
  /KEEP=row col
  /NULL=KEEP.

split file by row.
weight by kount.
crosstabs col by Y / cell = count row / stat = chisqr.
split file off.

However, the OP is asking for 36 p-values, apparently.  So I'm not sure what
they want.  If they want p-values for 98.3% vs 1.7% (cell 1 in the original
table), 97% vs 3% (cell 2, original table), etc, that seems rather
pointless.



Mark Miller wrote
> Salman,
>
> This "table" may appear to have been constructed as a cross-tab but
> it does not appear to me to represent a single 6x6 table.
> Rather, it is  the conjunction of 6 separate 1-way tables where
> the columns are instances of the nominal category Ed Level
> and the rows are actually separate service items.
>
> Otherwise, you need to explain what exactly is indicated by each row.
>
> In any case, I know of no procedure which will give you a P-value
> for the interior cells, although perhaps you could get a separate
> Chi-squared value for each row as indicated by the P-value column
> on the right.
>
> ... Mark Miller
>
>
> On Tue, May 7, 2013 at 5:35 AM, David Marso <

> david.marso@

> > wrote:
>
>> What do you mean by "calculate the P-values of this table"?
>> What do you wish to learn from this data?
>> "What should I do for further calculation?"
>> That is hardly a question which can be readily answered considering your
>> question is ill defined at best.
>> Back up a few paces, carefully define your question and perhaps describe
>> the
>> process by which this data table came about.
>> Do you have access to the raw data or merely this summary table?
>> --
>>
>> salman_stats wrote
>> > If we are not considering the assumption of Chi-square test for
>> proportion
>> > and frequencies of the table. What should I do for further calculation?
>> >
>> > Could you please tell what will be most possible option or method to
>> > calculate the P-values of this table.
>>
>>
>>
>>
>>
>> -----
>> Please reply to the list and not to my personal email.
>> Those desiring my consulting or training services please feel free to
>> email me.
>> ---
>> "Nolite dare sanctum canibus neque mittatis margaritas vestras ante
>> porcos
>> ne forte conculcent eas pedibus suis."
>> Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff
>> in
>> abyssum?"
>> --
>> View this message in context:
>> http://spssx-discussion.1045642.n5.nabble.com/How-can-I-calculate-the-P-values-in-6-X-6-contigency-table-tp5719892p5720026.html
>> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>>

> LISTSERV@.UGA

>  (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
>>





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/How-can-I-calculate-the-P-values-in-6-X-6-contigency-table-tp5719892p5720041.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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