Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Statsby equivalent with -ml-


From   "Nuno" <liststata@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Statsby equivalent with -ml-
Date   Tue, 11 Dec 2007 12:22:08 -0000

Thank you Paul!

My mistake was not putting the -max- option at the end I don't have much
experience with the -ml- command). I believe it's running now! 

Best,

Nuno


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of E. Paul Wileyto
Sent: terça-feira, 11 de Dezembro de 2007 12:00
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Statsby equivalent with -ml-

This seems to run when I do it:

. statsby _b _se, by(runnum) clear: ml model lf cure_lik (hazard: _t= drug )
(nocure:
 > _d= drug ) (shape: _t0=), max difficult iter(50) (running ml on
estimation sample)

command: ml model lf cure_lik (hazard: _t= drug ) (nocure:_d= drug ) (shape:
_t0=), max difficult iter(50)
by: runnum

Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
........

What error are you getting?

Paul



Nuno wrote:
> Hi everyone,
>
> I have a maximum likelihood model that I want to apply to a set of 
> difference indviduals and record the estimated coefficients. Normally 
> I use the  -statsby- command to record the coefficients on a dta file, 
> but it seems not to work with ml (or at lesat I was unable to do so). 
> The setup is the following:
>
>
> program testml
> ...
> end
>
> ml model lf testml (mu1: Y=X1) (mu2: Y=X2) /sigma1 /sigma2 ml maximize
>
>
>
> My data is organized in the following way:
> id	Y	X1	X2
>
>
> and I need to run the testml program for each id and record the 
> coefficients in a .dta file.
>
> Any ideas of how to solve this issue?
>
> Best,
>
> Nuno
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>   

--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA  19104-3309

215-746-7147
Fax: 215-746-7140
epw@mail.med.upenn.edu
http://mail.med.upenn.edu/~epw/ 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index