Re: [R] Hardy Weinberg Simulation

2011-06-29 Thread David Duffy
I have the code below but the p-values are not what I am expecting. I want to use the Cochran Armitage trend test to get the p-values. What do you expect? Depending on the genetic model, you may not see HWE in the cases. datamat[h,] - t(rmultinom(1, size=c(10, 40, 50), prob=c(0.33, 0.33,

[R] Hardy Weinberg Simulation

2011-06-27 Thread Jim Silverton
Hello, I am trying to simulate 10 relicates of 100-tables. Each table is a 2 x 3 and 80% pf the tables are true nulls and 20% are non-nulls. The nulls follow the Hardy Weinberg distribution (ratio) 1:2:1. I have the code below but the p-values are not what I am expecting. I want to use the