Statalist


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

Re: st: Profile likelihood


From   "Katia Bobulova" <[email protected]>
To   [email protected]
Subject   Re: st: Profile likelihood
Date   Wed, 17 Dec 2008 13:00:54 +0100

Dear Stas,thank you very much for your suggestion, but it doesn' t
work because a and d are not numerical variables. They are
probabilities that I want to estimate with my maximum likelihood. So
Stata gave my an error message.This is again my model:program define
trinomversion10.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, difficult Now I would like to
impose the values of two parameters, for example a and d, in order to
estimate the other two, in other words I want to maximize the profile
likelihoods, as it is illustrated in the ml hold help of Stata.  Could
you please help me?Thank you very much.Katia2008/12/15 Stas Kolenikov
<[email protected]>:> 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> <[email protected]> wrote:>> 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>> model.Could you please help me?Thank you very much.Katia>>
*>> *   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/>
*
*   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/



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