Hi...

Hello,
I use Stata 15. I have a panel dataset. I want to estimate for each id/country.

The syntax of -mswitch- is

Code:
mswitch dr depvar [nonswitch_varlist] [if] [in] [, options]

While the syntax allows for “if”, when we estimate the command like this,

mswitch dr gcf if id==1, switch(gds)

Stata returns the following:"
sample may not include multiple panels
r(459);

Any help on how to estimate mswitch for each id will be greatly appreciated.

Thank you