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

Abstract

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 true.data handling

Similar works

Full text

thumbnail-image

Research Papers in Economics

redirect
Last time updated on 06/07/2012

This paper was published in Research Papers in Economics.

Having an issue?

Is data on this page outdated, violates copyrights or anything else? Report the problem now and we will take corresponding actions after reviewing your request.