From | Ernest Berkhout <[email protected]> |
To | [email protected], [email protected] |
Subject | Re: st: generate new variable with frequencies |
Date | Tue, 04 Nov 2003 14:04:54 +0100 |
At 13:42 4-11-2003, Matteo Foschi wrote:
If I understand correctly, you should just keep it more straightforward using some of the -egen- functions (see -help egen-).We have a little trouble with a, we think, easy task. We want to generate a variable, which contains the relative frequency of another variable values. We have a variable, say "type", and want to built a new variable, say "typ_freq", which shows the relatively frequency of each value of "type".
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |