Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65094

String variable for age groups

$
0
0
Dear Statalisters,

I am using Stata 13.1 and I am trying to convert a variable for age groups in the form 1- ; 6- ; 11- , obtained after converting a continuous age variable (1-100) using the following command:
Code:
egen agegroup = cut(age), at(1 (5) 100) label
into a string variable with specific age intervals that look like this 1-5 ; 6-10 ; 11-15 ; ...

Any help will be appreciated.

Thanks.

Viewing all articles
Browse latest Browse all 65094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>