I have the following estimation command using fmm:

> fmm 3: regress $Y $T $X

where $Y $X and $T are well defined and understood by Stata. I know this because when I run reg $Y $T $X, it runs fine.

I get this error:

invalid varname
st_matrixcolstripe(): 3300 argument out of range
_gsem_build__cnsopt(): - function returned error
_gsem_build(): - function returned error
_gsem_parse(): - function returned error
st_gsem_parse(): - function returned error
<istmt>: - function returned error

The other interesting thing is if I run the SAME model from the command window and not in a do-file, it runs fine.

Any help appreciated.

Christian