A colleague used the exact code below to run a meta-analysis with the if statement being string variables, however when I run the code I get an error message "mean_temp not found, r(111)".

code: metan lnor selnor if exposure== "mean_temp", random by(lag) label(namevar = health_unit) eform nooverall title(Mean Temperature)

I then tried using encode to turn the string variables in categories but then I relieve the error "too few variables specified, r(102)"

Please help