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 |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Calling a ML program in an ado file |

Date |
Mon, 12 Jul 2010 11:41:39 +0100 |

Try putting your -myprobit- program in a separate file -myprobit.ado-. Nick n.j.cox@durham.ac.uk Valérie OROZCO I would like to create some ado-files in order to replicate some estimations on several data. I have some problems calling ml program in my ado (they are not known). Let's take a small example : /*----------------------------- begin Example.ado-----------------------------*/ program Example version 11.1 args varY X1 X2 use http://www.stata-press.com/data/r11/auto di "Call myprobit" ml model lf myprobit (`varY' = `X1' `X2') ml maximize end program myprobit version 11 args lnf theta1 quietly replace `lnf' = ln(normal(`theta1')) if $ML_y1==1 quietly replace `lnf' = ln(normal(-`theta1')) if $ML_y1==0 end /*----------------------------- end Example.ado-----------------------------*/ Running the ado "Example" gives the following message : . Example foreign mpg weight (1978 Automobile Data) Call myprobit unrecognized command: myprobit r(199);" I don't understand why the program "myprobit", written in the ado file, remains unknown... What is my mistake??? * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Calling a ML program in an ado file***From:*Valerie Orozco <Valerie.Orozco@toulouse.inra.fr>

- Prev by Date:
**st: RE: mvreg with vce(robust)?** - Next by Date:
**st: AW: Fixed-effects Vector Decomposition** - Previous by thread:
**st: Calling a ML program in an ado file** - Index(es):