Re: [R] binomial simulation

2007-08-14 Thread sigalit mangut-leiba
: k - rbinom(N,1,p) m - rbinom(k,1,q) Regards, Moshe. --- sigalit mangut-leiba [EMAIL PROTECTED] wrote: Hi, The probability of false detection is: P(T+ | D-)=1-P(T+ | D+)=0.05. and I want to find the joint probability P(T+,D+)=P(T+|D+)*P(D+) Thank you for your reply, Sigalit

Re: [R] binomial simulation

2007-08-13 Thread sigalit mangut-leiba
+ = d) for all the combinations of t and d (for ICU and Reg.)? Is the probability of false detection (when there is no disease) always 0? Regards, Moshe. --- sigalit mangut-leiba [EMAIL PROTECTED] wrote: hello, I asked about this simulation a few days ago, but still i can't get what i

[R] binomial simulation

2007-08-11 Thread sigalit mangut-leiba
hello, I asked about this simulation a few days ago, but still i can't get what i need. I have 2 units: icu and regular. from icu I want to take 200 observations from binomial distribution, when probability for disease is: p=0.6. from regular I want to take 300 observation with the same

[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 sigalit mangut-leiba
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 Neuroscience Oregon Health Science University On 8/8/07, sigalit mangut-leiba [EMAIL PROTECTED] wrote: hello, i want to do

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

[R] t-test

2007-08-05 Thread sigalit mangut-leiba
Hi all, i'm trying to run a two-sample t-test. i have a longitudinal data that looks like this: idnageclass 1 22 1 1 22 1 1 22 1 1 22 1 2 63 3 2 63 3 2 63 3 3 43 2 3 43 2 3 43

[R] tapply

2007-07-19 Thread sigalit mangut-leiba
hello, i want to compute the mean of a variable (aps) for every class (1,2, and 3). every id have a few obs., aps and class are constant over id. like this: id aps class 1 11 2 1 11 2 1 11 2 1 11 2 1 11 2 2 83 2 8

[R] tapply

2007-07-19 Thread sigalit mangut-leiba
I'm sorry for the unfocused questions, i'm new here... the output should be: classaps_mean 1 na 2 11.5 3 8 the mean aps of every class, when every id count *once*, for example: class 2, mean= (11+12)/2=11.5 hope it's clearer. sigalit.

[R] Fwd: tapply

2007-07-19 Thread sigalit mangut-leiba
thank you! sigalit. -- Forwarded message -- From: sigalit mangut-leiba [EMAIL PROTECTED] Date: Jul 19, 2007 7:03 PM Subject: tapply To: r-help r-help@stat.math.ethz.ch I'm sorry for the unfocused questions, i'm new here... the output should be: classaps_mean 1

[R] filter out observation by condition

2007-07-18 Thread sigalit mangut-leiba
hello, I have a longitudinal data: idn mort30 newinfec 1 0 1 1 0 1 1 0 1 1 0 1 2 1 1 2 1 1 2 1 1 3 0

[R] table function

2007-07-16 Thread sigalit mangut-leiba
Hello all, I want to use the table function, but for every id I have a different no. of rows (obs.). If I write: table(x$class, x$infec) I don't get the right frequencies because I should count every id once, if id 1 has 20 observations It should count as one. can I use unique func.

[R] the table function

2007-07-16 Thread sigalit mangut-leiba
Hello all, I want to use the table function, but for every id I have a different no. of rows (obs.). If I write: table(x$class, x$infec) I don't get the right frequencies because I should count every id once, if id 1 has 20 observations It should count as one. can I use unique func. here?

[R] longitudinal data

2007-07-08 Thread sigalit mangut-leiba
Hello all, I want to analyze data that looks like this: Id var1 var2 var3.. 1 0 1 0 1 0 1 1 2 2 2 2 Not all id's have the same no. of observations. At the first stage I want to count how many people in the survey, how many have 1 in var1, etc. How