You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
There is a good chance you don't actually need this. Many commands like sum and estimation commands like regress, logit etc accept factor variable specifications that allow you to specify something like i.varname , and they will automatically generate the indicator variables needed on the fly. You might want to check
Code:
help fvvarlist
However, you can only use the i. operator on numerical variables, so if your current variable is string, you may want to first convert it to numeric using encode. See
Code:
help encode
If you do still want to create indicators, one option might be to use the generate() option to the tab command: see
Comment