[R] In which order should the "p" argument within chisq.test() be specified when working in 3 dimensions?

Peter Davidsen pkdavidsen at gmail.com
Wed Oct 2 11:42:09 CEST 2013


Dear List,

I'm in the process of setting up a chi square test with 3 groups (A, B
and C). Hence, I have generated an array object like this:

my.obj <- array(c(overlap_ABC, overlap_AB, overlap_AC, unique_A,
overlap_BC, unique_B, unique_C, not_in_any), dim=c(2,2,2))

Now I'm in the process of generating a vector of probabilities that I
can use to define the "p" argument within the chisq.test() command.
However, I'm unsure as to which order my vector 'p' needs to be
defined?
Is is just:
p=c(overlap_ABC, overlap_AB, overlap_AC, unique_A, overlap_BC,
unique_B, unique_C, not_in_any) # same sequence as I used to define my
array matrix

Many thanks,



More information about the R-help mailing list