Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Maarten Buis <maartenlbuis@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: passing an equation list? |

Date |
Sat, 13 Oct 2012 22:19:44 +0200 |

On Sat, Oct 13, 2012 at 9:31 PM, Sun Yutao <yutao.sun.statalist@outlook.com> wrote: > Does anyone know how to pass an equation list : (fist: y=x) (second: x=z) .... into a stata "program"? That depends on the program, the exact form of the functions, how general you want it to be, etc. etc. One possibility is to have it all in one string and start parsing on the brackets, you would need a way of distinguishing between brackets that are part of the equation and brackets that are deliminating different equations, but with some careful thought that can be done. Alternatively you can let each equation be an option. This can be especially attractive if there is a known (maximum) number of equations. You can always take a look inside other programs that allow multiple equations, and see how they handle those: e.g. -heckman- could be an example where the different equations are handled through an option and a regular varlist or -sureg- is an example where the equations are deliminated with brackets. To look inside programs you can use -viewsource-. Hope this helps, Maarten --------------------------------- Maarten L. Buis WZB Reichpietschufer 50 10785 Berlin Germany http://www.maartenbuis.nl --------------------------------- * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**RE: st: passing an equation list?***From:*Sun Yutao <yutao.sun.statalist@outlook.com>

**References**:**st: passing an equation list?***From:*Sun Yutao <yutao.sun.statalist@outlook.com>

- Prev by Date:
**st: passing an equation list?** - Next by Date:
**st: log likelihood** - Previous by thread:
**st: passing an equation list?** - Next by thread:
**RE: st: passing an equation list?** - Index(es):