Statalist The Stata Listserver


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

st: Re: RE: Fw: regarding stata MLE


From   Suddhasil Siddhanta <[email protected]>
To   [email protected]
Subject   st: Re: RE: Fw: regarding stata MLE
Date   Thu, 15 Jun 2006 16:59:25 +0530

Dear Nick,

I am now facing a problem in getting results for ml estimation in
stata.

the program that I have writen in a lf file is:-

program define myprog

args lnf theta1 theta2

quietly replace 'lnf'= -.5*ln(2*_pi)-.5*ln('theta2')-.5*(($ML_y1-'theta1')^2)/'theta2'

end

the statistical details that I have used to form the program is
1. the dependent vriable is normally distributed
the log likelihood is

]


then in the command window I typed

. ml model lf myprog (reg: name of dependent variable = name of independent
variables)

. ml maximize

now i am getting the eror 198 invalid name

please suggest me what i am doing wrong



Best,


suddhasil



----- Original Message ----- From: "Nick Cox" <[email protected]>
To: <[email protected]>
Sent: Thursday, June 08, 2006 6:29 PM
Subject: st: RE: Fw: regarding stata MLE



This is already programmed for you as -regress-.

Nick
[email protected]

N.B. Please do not send HTML to the list.

Suddhasil Siddhanta

I've just begun with the maximum likelihood with Stata.

Can you please help me in this regard. My estimation equation is a linear
one with normal distribution.

Y = constant + ax1 +b x2, where y is the dependent variable, a, b are the
coefficient and x1, x2 are the independent variables.

Can you please help me in providing a programme that will run for the
equation.

*
*   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/

Attachment: clip_image002.gif
Description: GIF image




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