You can use the rbinom function to generate the random data. What to feed that
function depends on things that you did not state (is this a comparison of 2
groups?, a logistic regression?, etc.).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Jim Silverton
> Sent: Monday, January 25, 2010 9:44 PM
> To: r-help at r-project.org
> Subject: Re: [R] Hypothsis simulation
>
> I wish to simulate:
>
> Ho: Odds Ratio =1
> H1 Odds Ratio <> 1
>
> Can any of the R users show me how to generate this data for say 20%
> from Ho
> and 80% from H1?
>
> Thanks,
>
> Jim
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.