I would greatly appreciate any help with the following problem.
I want to generate a pair of vectors with the following properties. Each
vector has N elements.
(1) the vector entries equal 0 or 1
(2) BR percent of each vector contains 1's - the remaining elements equal 0
(BR = base rate of disease in population)
(3) the vectors satisfy the following criteria
[pseudo code]
for (i in 1:N){
if(VecA[i]==1 & VecB[i]==1) we have a match
}
Def:
concordance = (2 x # matches)/(N+ # matches)
I want to generate data that simultaneously satisfies a given Base rate (BR)
_AND_ a given concordance rate.
In genetics, the above concordance rate is called a probandwise concordance
rate among twins.
Many thanks for any suggestions. I am pulling my hair out over this one!
********************************************************************
Niels Waller, Ph.D.
Associate Professor
Address: One Shields Avenue Phone: (530) 752-4459
Department of Psychology
University of California
Davis, CA 95616
Internet: http://psychology.ucdavis.edu/waller
********************************************************************
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|