Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Loop for survey data

From   ajjee <>
Subject   st: Loop for survey data
Date   Sun, 13 Nov 2011 09:35:37 -0800 (PST)

Dear All

I have a survey dataset of 6 countries for 3000 respondents. Respondents
have age between 15 to 75. The survey was conducted in 1998. Also I have the
inflation for each country. Now I would like to compute a variable
inflation_experience(Inflation experienced in adult life) for each
respondent in each country and this variable should be computed as:

For each respondent in each country

year_of_birth = 1998-age
adult_year = year_of_birth+15
inflation_experience = max(inflation between adult_year and 1998)

I am having problem to write a loop to compute this variable. Please help!!



View this message in context:
Sent from the Statalist mailing list archive at
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index