Skip to main content
Article thumbnail
Location of Repository

_GRPOS: Stata module to identify observations with at least n positive values

By Fred Wolfe


For egen newvar = rpos(varlist), newvar is 1 if any of the values in varlist are not missing and not 0, else 0. The default number of positive values to be found is 1, but this can be set with Minpos(). The greatest value to be considered to be missing is 0, but may be set (e.g. -1, 2, etc) by Lowlim(). This program was written for the specific case when respondents in surveys answer some, but not all, of a series of questions, and it is desired to make inferences based on some of the answers. For example, If the respondent does not answer the question: Have you had cancer, but does answer 'What year did this occur' or other questions, then it is reasonable to assume 'have you had cancer' is also handling

OAI identifier:
Download PDF:
Sorry, we are unable to provide the full text but you may find it at the following location(s):
  • (external link)
  • Suggested articles

    To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.