[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: New user...trying to use ADO file with SVR
At 09:05 19/08/03 -0700, kat jackson wrote:
Stata expects an ado-file to contain a program of the same name, ie the
ado-file -ml_try2.ado- should contain a program -ml_try2-, and -mlcot.ado-
should contain a program -ml_cot-. I think what Kat really wants to do is
to use -ml_try2.ado- as a do-file instead of an ado-file. To do this,
rename -ml_try2.ado- to -ml_try2.do-, and then run -ml_try2.do- by typing
I am a beginner STATA user/programmer and have run
into problems when trying to use an ado file.
I want to use an ado file to work with -svrest-,
however I'm running into problems when it gets to the
ado file trying to run.
I've been submitting the -svrset- part first. I then
try to submit the line
svrest "ml_try2", mat(e(b))
and here is where I run into problems.
Below you will find the code in my ado file.
--------- begin ml_try2.ado ----------------
program define mlcot
args lnf B0 B1 B2 sigma
quietly gen double `res' = logcot -
quietly replace `lnf'=-0.5*ln(2*_pi) -ln(`sigma')
ml model lf mlcot (B0:) (B1:) (B2:) (sigma:), robust
--------- end ml_try2.ado -----------------
I get the following error:
unrecognized command: mlcot
program mlcot not found
error when command executed on original dataset
I don't know if there is something w/my ado file or
not. I do want to point out that when I run the
program above by itself, I have no problems & get
results. So I don't believe that there's anything
wrong with the coding to run the -ml- model.
In this case, Stata will run -ml_try2.do-, and will find the program
-ml_cot- inside -ml_try2.do-, and execute -ml_cot- when told to do so by -ml-.
The suffix -ado- is short for Automatic DO, and implies that the file
contains a program of the same name. See -help do- and -help ado- for more
I hope this helps.
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Opinions expressed are those of the author, not the institution.
* For searches and help try: