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: simulation for generalized ordered logit models
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: simulation for generalized ordered logit models
Date
Thu, 19 May 2011 14:50:14 +0200
On Wed, May 18, 2011 at 9:11 PM, Jun Xu <[email protected]> wrote:
> I am trying to study performance of some extensions of the order logit models (e.g., generalized ordered logit models and partial proportionality models. However, it appears the data generating process is a bit tricky. My problem is that I don't know (or I don't know if I did it right) how to turn latent y's into an observed ordered response variable. In addition, because of that, I think the gologit2 estimates seem to be off quite a bit.
One problem I see is in the way you create the error term: you should
use the same error term for both equations. Anyhow, below is an
example that seems to work well. For summarizing the simulation
results I use Ian White's -simsum- command, as discussed in (White
2010). You can install it by typing in Stata. -findit simsum- and
follow the instruction. In this example -gologit2- seems do very well
with respect to both bias and coverage.
*--------------------- begin example -----------------------------
set seed 1234
program drop _all
program define sim
drop _all
set obs 500
gen x1 = rnormal()
gen x2 = rnormal()
gen u = runiform()
gen ystar2 = 1 + x1 - .5*x2 + ln(u/(1-u))
gen ystar3 = -1 + x1 - 1*x2 + ln(u/(1-u))
gen y = cond(ystar2 < 0, 1, ///
cond(ystar3 < 0, 2, 3))
gologit2 y x1 x2, pl(x1)
end
simulate _b _se, reps(5000) : sim
simsum _eq1_b_x1 , true(1 ) se(_eq3_se_x1) ///
mcse bias cover
simsum _eq1_b_x2 , true(-.5) se(_eq3_se_x2) ///
mcse bias cover
simsum _eq1_b_cons, true(1 ) se(_eq3_se_cons) ///
mcse bias cover
simsum _eq2_b_x1 , true(1 ) se(_eq4_se_x1) ///
mcse bias cover
simsum _eq2_b_x2 , true(-1 ) se(_eq4_se_x2) ///
mcse bias cover
simsum _eq2_b_cons, true(-1 ) se(_eq4_se_cons) ///
mcse bias cover
*------------------------ end example ------------------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )
Ian R. White (2010) "simsum: Analyses of simulation studies including
Monte Carlo error" The Stata Journal, 10(3):369-385.
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/