Hello members,

I would like to seek your suggestion please on how best I can create a categorical variable from the list of the list below, so that I can have a breakdown of a surveyed population into 4 distinct categories: IDP, nomads, urban (u) and rural (r)?

The goal is to use the categorical variable to create a dummy variable which I can use to compare some estimates for the different categories.

Thanks,
Mohamud

Code:
tab astrata

                  Analytical strata |      Freq.     Percent        Cum.
------------------------------------+-----------------------------------
                                IDP |     48,632        9.02        9.02
                            Nomadic |     53,847        9.99       19.01
                        (u):Banadir |     94,493       17.53       36.55
                         (u):Nugaal |      4,554        0.84       37.39
                     (u):Bari+Mudug |     40,523        7.52       44.91
                (u):Woqooyi_Galbeed |     20,783        3.86       48.77
     (u):Awdal+Sanaag+Sool+Togdheer |     29,108        5.40       54.17
(u):Hiraan+MiddleShabelle+Galgaduud |     62,693       11.63       65.80
       (u):Bay+Bakool+LowerShabelle |     74,231       13.77       79.58
         (r):Awdal+Togdheer+Woqooyi |      5,292        0.98       80.56
(r):Hiraan+MiddleShabelle+Galgaduud |     61,334       11.38       91.94
       (r):Bay+Bakool+LowerShabelle |     43,450        8.06      100.00
------------------------------------+-----------------------------------
                              Total |    538,940      100.00