I apologise for what may be a fairly rudimentary question. I want to

generate a random variable (wt), n = 5000; as follows;

set obs 5000

set seed 1000

g wt = 70 * rnormal(1, 0.15)

However, wt also needs to be constrained as follows, 45 < wt < 95. I am

having difficulty incorporating the constraint into the generate

function, and would appreciate any help.

--David

--

David M Collins, Ph.D.

Dean & Professor, Faculty of Pharmacy

University of Manitoba, Apotex Centre

750 McDermot Avenue, Winnipeg MB R3E 0T5

CANADA.

Tel. 204-474-8794 Fax: 204-474-7617

Email:

[hidden email]
CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s)

is intended for the addressee(s) only and may contain confidential

information. If you are not an intended recipient of this message or an

authorized assistant to an intended recipient, please notify the sender

by replying to this message and then delete it from your system.

Use, dissemination, distribution, or reproduction of this message and

any of its attachments (if any) is not authorized and may be unlawful.

*

* For searches and help try:

*

http://www.stata.com/help.cgi?search*

http://www.stata.com/support/statalist/faq*

http://www.ats.ucla.edu/stat/stata/