Dear Statausers
I have a dataset containing total percentage of religious adherents looking like this:
year state christianity islam buddhism
1987 Norway 67 21 8
67 % of the Norwegian population is christian, 21 % muslim etc.
I want to create a new variable called religion which report which of the three religions most Norwegians adhere to.
E.g
gen religion=0
replace religion=1 if christianity is the largest of the three
replace religion=2 if islam is the largest of the three
replace religion=3 if buddhism is the largest of the three
Any help would be appreciated.
I have a dataset containing total percentage of religious adherents looking like this:
year state christianity islam buddhism
1987 Norway 67 21 8
67 % of the Norwegian population is christian, 21 % muslim etc.
I want to create a new variable called religion which report which of the three religions most Norwegians adhere to.
E.g
gen religion=0
replace religion=1 if christianity is the largest of the three
replace religion=2 if islam is the largest of the three
replace religion=3 if buddhism is the largest of the three
Any help would be appreciated.
Comment