Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: reoprob and clustering

From   Joerg Luedicke <>
Subject   Re: st: reoprob and clustering
Date   Sun, 3 Jul 2011 09:43:18 -0400

You should have said in your post where -reoprob- is from. Anyway,to
me it seems that -gllamm- is much faster than -reoprob-, which seems
to be really slow. Consider the following fake data with 5000
observations from 1000 subjects. Whereas -reoprob- takes around 110
seconds, -gllamm- needs around 25 seconds for a model with one
covariate on my machine.

*creating some fake data

clear all
set obs 1000
matrix m1=(10, 0)
matrix sd1=(1, 1)
matrix C1 = (1.0000, 0.5, 1.0000)
drawnorm y1 x1 , n(1000) means(m1) sds(sd1) corr(C1) cstorage(upper) forcepsd
gen id=_n
expand 5
bys id: gen time=_n
sort id time
bys id: replace y1=y1[_n-1]+(1+rnormal()) if _n>1
bys id: replace x1=x1[_n-1]+(0.2+rnormal()) if _n>1
gen dv=.
forval i=1/5{
	qui sum y1 if time==`i', d
	replace dv=cond(y1<r(p25), 1, cond(y1<r(p75),2,3)) if time==`i'

*comparing models
timer on 1
reoprob dv x1, i(id)
timer off 1

timer on 2
gllamm dv x1 , i(id) link(oprobit) nip(12)
timer off 2

qui timer list 1
di as txt "time elapsed reoprob (seconds): " as res r(t1)
qui timer list 2
di as txt "time elapsed gllamm (seconds): " as res r(t2)



On Sun, Jul 3, 2011 at 7:33 AM, Dimitrije Tišma
<> wrote:
> Dear all,
> I am trying to do some random ordinal probit estimations and am
> possibly facing a tough trade-off. Gllamm has a built-in option for
> clustering when working with random ordinal probit, while -reoprob-
> does not. On the other hand, the latter is around three times faster
> than gllamm, at least on my computer. I want to do around 60
> regressions in total and this time cost is substantial. So, I was
> wondering if anyone knows of some way to adjust for standard errors
> when working with reoprob? And if yes, how can it be done? Thanks a
> lot!
> Dimitrije
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index