test of independence
1
0
Entering edit mode
10.7 years ago
stat.1405 ▴ 30

if i have categoriacl data 15 col and 5000 rows,

the values are 0 or 1

0 means no missing

1 means missing

how can i test the indpendency, Is the missing independent across the all data?

R next-gen • 1.6k views
ADD COMMENT
0
Entering edit mode

Do you want to test for independence among adjacent rows? Or do you want to know if missing values tend to occur within the same rows?

ADD REPLY
0
Entering edit mode

I think op want's to find independence of columns, but it is impossible to be sure after repeated questions, most likely he doesn't understand or describe the problem well. op repeatedly said "all the data" which not neccessarily makes sense. So I gave an answer according to how the question makes most sense: Alternative hypotheses: "The number of missing genotypes dependends on the sample" If the question is "Does the number of missing genotypes depend on the marker?", then the zero/one matrix can just be transposed, I assume.

ADD REPLY
0
Entering edit mode

I change the values in the matrix from missing values ike this ./. to 1 other 0.

now is the missing which is one's independent , or there is a pattern also i need to test the correlation, it is 0 and 1 so i do not think so the cor command works here.

Dear Michael, mybe you are write, every row in my data is position.

ADD REPLY
0
Entering edit mode

thanks thanks

ADD REPLY
0
Entering edit mode

In fact, I am interested to test both

ADD REPLY
0
Entering edit mode
10.7 years ago
Michael 55k

See fisher's exact test: ?fisher.test.

zero.one = matrix(rbinom(15*5000,1,0.5), ncol=15)
ccounts = apply(zero.one, 2, function(x) c(sum(x), 5000-sum(x)))

fisher.test(ccounts, simulate.p.value=TRUE)

    Fisher's Exact Test for Count Data with simulated p-value (based on 2000 replicates)

data:  ccounts
p-value = 0.3318
alternative hypothesis: two.sided
ADD COMMENT

Login before adding your answer.

Traffic: 1351 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6