Stata:条件判断

多条件判断命令inlistinrange,适用于重污染企业定义等
keep if inlist(state, "AL", "AK", "AZ")
*等价于:

keep if state=="AL" | state=="AK" | state=="AZ"

keep if inrange(distance, 10, 91)
*等价于:
keep if distance>=10 & distance<=91
posted @ 2023-01-15 07:25  myrj  阅读(558)  评论(0编辑  收藏  举报