Dear group,

Stata novice here trying to create meta-analysis forest plots using Stata.
I am really struggling to figure out how to do subgroup analysis using the metan command. Reading the help file, I have figured out "by" command should do the trick, but I must be doing something wrong as Stata keeps on saying "option by not allowed".

The following is the command I have tried to use.

Code:
metan lnor lnlci lnuci if food=="fruit", ///
eform random effect (Odds Ratio) ///
lcols (author year n country ortype) ///
xlabel (0.05 0.1 1 5)///
by income
Please help!