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

RE: st: Likelihood function of uniform distribution

From   Maarten buis <>
Subject   RE: st: Likelihood function of uniform distribution
Date   Thu, 3 Apr 2008 21:40:22 +0100 (BST)

--- Mostafa Beshkar <> wrote:
> As Jay mentioned, my problem is an ordinary binary regression model.
> In case of probit, for example, you need to use the Normal
> distribution function to define your likelihood evaluator.  Since
> the normal distribution function is already defined in Stata you
> can simply use it in your likelihood evaluator.

No, As Jay already mentioned the distribution is the Bernouli
distribution, the cumulative density function of the normal enters the
likelihood NOT because it is a distribution, but because it
conveniently stays between 0 and 1 (as any other cumulative density
function will)
> In my case, however, the difficulty is that I don't know how to
> define the necessary distribution function, i.e., the uniform 
> distribution function. More specifically, I need to first define the
> following function:
> f(p)=1 if 0<p<1
>     =0 otherwise.
> Simply, my question is how one can define the above function (or
> other functions such as a triangular pdf) in Stata. 

As people have already remarked you very very very likely do not want
that. Anyhow, I suggest you split your problem into two parts, first
write down your likelihood function. This is a paper and pensil
excersise that has nothing to do with Stata. Of help would be to see
how others have turned a random utility model into likelihood
functions. I like the discription by J. Scott Long and Jeremy Freese,
in Regression Models for Categorical Outcomes Using Stata. Second
Edition,  2005. College Station, TX: Stata Press.

You realy need to tackle this problem first before you can hope to be
succesful in tackling the second problem: how do I implement this in

First of, you probably don't have to: many many variants have already
been implemented, so have a good look at -help glm-, -help logit-,
-help probit-, -help cloglog-, etc.

If you realy need to, the only way to be succesful is get hold of
"Maximum Likelihood Estimation with Stata" by  William Gould, Jeffrey
Pitblado, William Sribney, see:

(No I don't have shares in StataPress)

Hope this helps,

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Sent from Yahoo! Mail.
A Smarter Inbox
*   For searches and help try:

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