Suppose I want to keep the coefficients for interaction terms using est table. In principle, this should just be a matter of choosing the appropriate keep() argument.
Previously, I've done this without any difficulties, using the standard factor variable notation e.g. keep(i.var1#i.var2). I've recently upgraded to Stata 15 (15.1) and have discovered that my previous scripts are throwing errors (including when I set the version back to 14). I can't see anything in the help file for estimates store to explain the changed behaviour, so am mystified.
Here's a simple example.
The error I'm getting is "invalid syntax". It seems the issue isn't with factor variables per se within keep(), for example keep(i.var1) or keep(1.var1) works as expected for the analogous regression.
Any help is appreciated (sidenote: I'm aware there are other ways of outputting results - such as esttab/estout - which I indeed use to export tables to latex etc. However estimates table is convenient for quickly printing results to screen etc.)
Previously, I've done this without any difficulties, using the standard factor variable notation e.g. keep(i.var1#i.var2). I've recently upgraded to Stata 15 (15.1) and have discovered that my previous scripts are throwing errors (including when I set the version back to 14). I can't see anything in the help file for estimates store to explain the changed behaviour, so am mystified.
Here's a simple example.
Code:
clear all version 15.1 sysuse auto2.dta fvset base none rep78 foreign reg price i.rep78#i.foreign, noconstant r est store test est table test, keep(i.rep78#i.foreign)
The error I'm getting is "invalid syntax". It seems the issue isn't with factor variables per se within keep(), for example keep(i.var1) or keep(1.var1) works as expected for the analogous regression.
Any help is appreciated (sidenote: I'm aware there are other ways of outputting results - such as esttab/estout - which I indeed use to export tables to latex etc. However estimates table is convenient for quickly printing results to screen etc.)
Comment