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

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'


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

. ml maximize

now i am getting the eror 198 invalid name

please suggest me what i am doing wrong



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

This is already programmed for you as -regress-.


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

*   For searches and help try:

Attachment: clip_image002.gif
Description: GIF image

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