English, Article edition: LEVELS: Stata module to report distinct levels of integer or string variable Nicholas J. Cox

User activity

Share to:
 
Bookmark: http://trove.nla.gov.au/version/103506
Physical Description
  • code
Language
  • English

Edition details

Title
  • LEVELS: Stata module to report distinct levels of integer or string variable
Author
  • Nicholas J. Cox
Physical Description
  • code
Notes
  • levels displays a sorted list of the distinct values of varname, which should be a variable taking on integer or string values, or in other words, a categorical variable, very broadly so defined. It may be useful when it is desired to cycle through the distinct values of varname with (say) foreach. levels leaves behind a list in r(levels) which may be used in a subsequent command. Optionally, the list may be inserted as a local macro within the calling program's space. levels is considered to be vallist (STB-60) done better. levels requires Stata 8. levels7, also herewith, is a version for Stata 7.
  • levels, vallist, Stata programming, values, foreach
  • RePEc:boc:bocode:s426303
Language
  • English
Contributed by
OAIster

Get this edition

  • Set up My libraries

    How do I set up "My libraries"?

    In order to set up a list of libraries that you have access to, you must first login or sign up. Then set up a personal list of libraries from your profile page by clicking on your user name at the top right of any screen.

  • All (1)
  • Unknown (1)
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.

User activity


e.g. test cricket, Perth (WA), "Parkes, Henry"

Separate different tags with a comma. To include a comma in your tag, surround the tag with double quotes.

Be the first to add a tag for this edition

Be the first to add this to a list

Comments and reviews

What are comments? Add a comment

No user comments or reviews for this version

Add a comment