Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: MLE est. linear form with two sets of parameters
From
Maarten buis <[email protected]>
To
[email protected]
Subject
Re: st: MLE est. linear form with two sets of parameters
Date
Mon, 31 May 2010 00:52:59 -0700 (PDT)
--- On Sun, 30/5/10, Denis Kalugin wrote:
> The goal is to estimate two latent variables, let's say L1
> and L2. The variables are linked to variable y in the following
> manner:
> y=0 if L1<z<L2
> y=-1 if z>L2
> y=1 if z<L1
>
> L1=exp(x*b1+error)/(1+exp(x*b1+error)
> L2=min[exp(x*b1+error)/(1+exp(x*b1+error)
> , exp(x*b2+error)/(1+exp(x*b2+error)
>
> This is estimated via slightly altered probit (as far as I
> understand).
>
> P(y=-1)=norm[(log(z/(1-z)) - xb1)/sigma(error1)]
> P(y=1)=(1-norm[(log(z/(1-z)) -
> xb1)/sigma(error1)])*(1-norm[(log(z/(1-z)) -
> xb2)/sigma(error2)])
> P(y=0)=1-p(y=-1)-p(y=1)
>
> However, my problem right now is how to feed TWO sets of
> parameters (b1 and b2) to be estimated. If i write this
> as a linear form, then stata would generate only one
> vector.
Looks like your are mixing up logits and probits, either use -normal- or
use exp(.)/(1+exp(.)). The latter can be coded more briefly as
-invlogit()- . Also note that coding normal(-xb) or invlogit(-xb) is much
more stable than (1-normal(xb)) or (1-invlogit(xb)).
Anyhow, for your immediate question:
Your claim about how -lf- works is not correct. You really need to get
your hands on: William Gould, Jeffrey Pitblado, William Sribney (2006)
"Maximum Likelihood Estimation with Stata, 3rd Edition", College
Station, TX: Stata Press.
<http://www.stata.com/bookstore/mle.html>
Your model looks very similar to -zoib-, so you can type -ssc install
zoib- and look at that program.
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/