[R] simulation-binomial

2007-08-08 Thread sigalit mangut-leiba
hello, i want to do a binomial simulation, by taking 200 var. from one group (x) and 300 from another (y). the prob. for disease=.6 in both groups. x - rbinom(200, 1, .6) y - rbinom(300, 1, .6) if the person is from group x - the probability to find the disease, assuming the person is sick, is

Re: [R] simulation-binomial

2007-08-08 Thread Kyle Henderson
That depends on what you meant by writing the conditional probability. Bayes rule says that the probability of testing positive when one has the disease is calculated as follows: Pr(T+ | D+)=(Pr(D+ | T+)*Pr(T+))/Pr(D+) is that what you mean? Kyle H. Ambert Department of Behavioral

Re: [R] simulation-binomial

2007-08-08 Thread sigalit mangut-leiba
I have the probability: P(T+ / D+) i want to find P(T+,D+) which is: P(T+ / D+)*P(D+) and i have those probabilities. i dont know how to write this in R. something like this: (say p2 is the conditional prob. and p1 is the joint prob.) p2 - p1/.6 x - rbinom(200, 1, .6) y - rbinom(300, 1, .6) if

Re: [R] simulation-binomial

2007-08-08 Thread Greg Snow
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sigalit mangut-leiba Sent: Wednesday, August 08, 2007 11:18 AM To: r-help Subject: Re: [R] simulation-binomial I have the probability: P(T+ / D+) i want to find P(T+,D+) which is: P(T+ / D+)*P(D+) and i have those probabilities. i

Re: [R] simulation-binomial

2007-08-08 Thread sigalit mangut-leiba
Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sigalit mangut-leiba Sent: Wednesday, August 08, 2007 11:18 AM To: r-help Subject: Re: [R] simulation-binomial I have the probability: P(T