Let's say I have a variable in Stata: house number.
I want a new variable that tells me the frequency of each value of 'house number'.
CodePudding user response:
bysort house_number : gen frequency = _N
Let's say I have a variable in Stata: house number.
I want a new variable that tells me the frequency of each value of 'house number'.
CodePudding user response:
bysort house_number : gen frequency = _N