Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index