[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: selecting random samples and run a simulation

From   "Natarajan, Raj" <>
To   <>
Subject   st: RE: selecting random samples and run a simulation
Date   Fri, 13 Jul 2007 10:46:48 -0400

I sent this e-mail yesterday but did not get any response. So I am resending hoiping it will come out.


From: Natarajan, Raj
Sent: Thu 7/12/2007 8:26 AM
Subject: selecting random samples and run a simulation

I would like to draw a random sample of 500 controls and 500 cases and calculate the odds ratio; repeat the process for 1000 times.

Example: (draw random sample)

matrix means=(0, 1.4)

matrix stdev = (1, 1)

draw norm control case, n(500) m (means) sds(stdev)

the outcome for the first 5 observations  will look like this:

  control          case 

 -1.315189      .1754738

-.6195259       -.4363556

-1.18018        .2124426

-.2960889       -.5825416

.4534519        -.1245893

PROBLEM: I would like the outcomes for controls and cases to be in one column and create a new variable called "status" which is 0 for control and 1 for case. 

Control_case        status

-1.315189               0

-.6195259               0

-1.18018                0

-.2960889               0

.4534519                0

.1754738                1

-.4363556               1

.2124426                1

-.5825416               1

-.1245893               1

I have to run the logistic regression to calculate the odds ratios; and repeat the process with different variances.

I would like to know how to make the outcomes arranged in one column with the creation of the variables "control_case" and "status".

Thank you for any suggestion.


This email message may contain legally privileged and/or confidential information.  If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited.  If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index