Command Reference : Function Reference : Function Reference: B
  
 
@between
Dummy variable for observation value within range of values.
Syntax: @between(x, v1, v2)
x: number or string
v1: number or string
v2: number or string
Return: number
where v1 and v2 correspond to the low and high values of the range.
Returns a dummy variable series equal to 1 for observations where x is greater than or equal to v1 and less than or equal to v2, and 0 otherwise.
Examples
series d1 = @between(x, 10, 100)
creates a dummy variable that takes the value 1 where the value of X is in the range defined by the values 10 and 100.
series d2 = @between(x, lowvals, highvals)
creates a dummy variable that takes the value 1 where the value of X is in the range defined by the series LOWVALS and HIGHVALS.
Cross-references
See also @inlist, and @between.