Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: maximum likelihood estimation of nonlinear models


From   Robert Duval <[email protected]>
To   [email protected]
Subject   Re: st: maximum likelihood estimation of nonlinear models
Date   Sun, 24 Jul 2005 16:59:14 -0400

Just taking a guess here...

your model

 y=x1^b1*x2^b2*x3^b3+e

has no intercept... so try adding the " , nocons " option to your statement

(y= , nocons)

also try putting parenthesis around your arguments like...

(x1^`theta1') *(x2^`theta2')*(x3^`theta3')

(at least this is what i interpret your above eq. to mean... but
without the parenthesis it is hard to know if you mean that rather
than

x1^(b1*x2^(b2*x3^b3))  or than

(x1^b1)*x2^(b2*x3^b3)

)


One question that comes to mind is why not assume altogether a
multiplicative error term so that your model is

y=x1^b1*x2^b2*x3^b3*e

if this were the case then you couldsimply  take logs and apply a
linear regression... but of course I ignore whether you have
theoretical reasons that prevent you from assuming that....

hope this helps,
robert

On 7/24/05, Paulo Regis <[email protected]> wrote:
> hi all,
> 
> I am working with nonlienar least squares (nl) and maximum likelihood (ml) estimators since I have a nonlinear specification. My problem is I cannot find the appropiate notation for my log likelihood function. My dependent variable (y) has a normal distribution. the model is:
> 
> y=x1^b1*x2^b2*x3^b3+e
> 
> 
> I checked "Maximum Likelihood Estimation with Stata" (gould and Sribney). In page 45, they present the programme to estimate:
> 
> y=b0+b1*x1+b2*x2+b3*x3^b4
> 
> which is:
> 
>         program define linreg
>         version 8.0
>         args lnf theta1 theta2 theta3 theta4
>         quietly replace `lnf'= ln(normd(($ML_y1-`theta1'-
>                         `theta2'*x3^`theta3')/`theta4'))-ln(`theta4')
>         end
>         ml model lf linreg (y = x1 x2) /beta3 /beta4 /sigma
>         ml maximize
> 
> So, i tried something similar
> 
>         program define linreg
>         version 8.0
>         args lnf theta1 theta2 theta3 theta4
>         quietly replace `lnf'= ln(normd(($ML_y1-x1^`theta1'
>                         *x2^`theta2'*x3^`theta3')/`theta4'))-ln(`theta4')
>         end
>         ml model lf linreg (y=) /beta1 /beta2 /beta3 /sigma
>         ml maximize
> 
> but it did not work. I am not sure if the problem is my notation for the log likelihood function in the programme in lines 4-5 or the "ml model" statement in line 7.
> I would appretiate any suggestion.
> 
> Cheers - Paulo
> 
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses, which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
> 
> 
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index