# Re: st: Profile likelihood

 From "Stas Kolenikov" To statalist@hsphsun2.harvard.edu Subject Re: st: Profile likelihood Date Mon, 15 Dec 2008 13:47:26 -0600

```You can set this up as a constrained problem:

constraint define 101 a = 0
constraint define 102 b = 0

ml model whatever , constraints(101 102)

On Mon, Dec 15, 2008 at 12:05 PM, Katia Bobulova
> Dear all,I would like to use the method of profile likelihoods to
> maximize my model.My full maximum likelihood model is the
> following:program define trinomversion 10.0args lnf a d m etempvar eh
> mmu ma me mdquietly gen double `eh'=0.5*`e'quietly gen double
> `mmu'=1-`m'quietly gen double `ma'=1-`a'quietly gen double
> `me'=1-`e'quietly gen double `md'=1-`d'quietly replace
> `lnf'=ln((`a')*(`d')*((((`mmu')*(`eh')+(`m'))^bo)*(((`mmu')*(`eh'))^so)*(((`mmu')*(`me'))^nt))+
> (`a')*(`md')*((((`mmu') *(`eh'))^bo)*(((`mmu')
> *(`eh')+(`m'))^so)*(((`mmu')*(`me'))^nt))+ (`ma')*(( (`eh')^bo)*(
> (`eh')^so)*( (`me')^nt))endml model lf trinom (a:) (d:) (m:)(e:)ml
> search ml maximize, difficultNow I would like to impose the values of
> two parameters, for example a and d, in order to estimate the other
> two, using the perform likelihoods.I read the example for the negative
> binomial distribution, but I am not able to understand how modify my
> *
> *   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/
>

--
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
*   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/
```