nulliftrue

0     0     Edited Sep 1, 2015
Usage:
[vector] x nulliftrue( [vector]expr, [vector]test )

Returns a vector x where:
xi is set to expri when testi evaluates to false, 0 or null.
xi is set to null when testi evaluates to true or 1.

Example:
nulliftrue(Q1, country==1) result will contain everyone whose country doesn't equal 1.


Leave a Comment

Please sign in to leave a comment.