I'm familiar with inlist, and generally use it in the format:
"gen example=1 if inlist(1,var1,var2,var3)"
as equivalent to "gen example=1 if 1==var1|1==var2|1==var3"
My question: Is there an equivalent to inlist for & conditions?
i.e. Ideally something to the effect of:
"gen example2=1 if function(1,var1,var2,var3)"
as equivalent to "gen example2=1 if 1==var1&1==var2&1==var3"
Thanks,
James
"gen example=1 if inlist(1,var1,var2,var3)"
as equivalent to "gen example=1 if 1==var1|1==var2|1==var3"
My question: Is there an equivalent to inlist for & conditions?
i.e. Ideally something to the effect of:
"gen example2=1 if function(1,var1,var2,var3)"
as equivalent to "gen example2=1 if 1==var1&1==var2&1==var3"
Thanks,
James