如何在 Stata 中声明 "string" 条件?

How to declare "string" condition in Stata?

我有一个 country 变量,它有 "Germany" 个值,但是当我 运行 回归时:

oprobit adl iadl depression_scale chronicw2 if country==Germany

它说 "Germany not found"。有

oprobit adl iadl depression_scale if "country"=="Germany" 

它说 "no observations"

我该如何解决?

您应该将变量值括在引号中,而不是它的名称(因此,oprobit adl iadl depression_scale if country =="Germany"