Statalist The Stata Listserver

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

st: Random number

From   "Nasreen Khan" <>
To   <>
Subject   st: Random number
Date   Thu, 08 Mar 2007 12:21:19 -0700

Dear All,

I need some help in figuring out the codes

I want to assign a random number based on the values of two variables.

My data set looks like this.

ID       Minyear                      Maxyear         
Nancy     1993                        1994
Ramon    1996                        1999
Eva         1992                        1992

I want to create a variable called randomyear such that the year is randomly assignment between minyear and maxyear value.

Thank you for your help.


*   For searches and help try:

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