The same problem exists with a vector of estimations obtained with GLLAMM :
/******ESTIMATION OF THE PARAMETERS WITH GLLAMM*****************/
. gllamm rep rep1-rep9, i(id) nocons family(binom) link(logit) trace
General model information
------------------------------------------------------------------------------
dependent variable: rep
family: binom
link: logit
denominator: 1
equation for fixed effects rep1 rep2 rep3 rep4 rep5 rep6 rep7 rep8 rep9
Random effects information for 2 level model
------------------------------------------------------------------------------
***level 2 (id) equation(s):
standard deviation of random effect
id1: _cons
number of level 1 units = 4248
number of level 2 units = 472
...
number of level 1 units = 4248
number of level 2 units = 472
Condition Number = 3.4788365
gllamm model
log likelihood = -2207.4371
------------------------------------------------------------------------------
rep | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
rep1 | -.1174269 .1311706 -0.90 0.371 -.3745166
.1396628
rep2 | 2.496076 .172519 14.47 0.000 2.157945
2.834207
rep3 | 2.38552 .1686237 14.15 0.000 2.055024
2.716016
rep4 | 1.081889 .1382254 7.83 0.000 .8109724
1.352806
rep5 | .3302297 .1318433 2.50 0.012 .0718216
.5886378
rep6 | 1.164174 .139379 8.35 0.000 .8909964
1.437352
rep7 | .8692891 .1356834 6.41 0.000 .6033545
1.135224
rep8 | 1.938048 .1551466 12.49 0.000 1.633966
2.24213
rep9 | -.1657712 .1312288 -1.26 0.207 -.422975
.0914326
------------------------------------------------------------------------------
Variances and covariances of random effects
------------------------------------------------------------------------------
***level 2 (id)
var(1): 2.2496163 (.23751741)
------------------------------------------------------------------------------
/**********************I SAVE THE ESTIMATED PARAMETERS
**************************/
. matrix est2=e(b)
/********************I EVALUATE THE MODEL WITH THE ESTIMATED PARAMETERS
************/
. gllamm rep rep1-rep9, i(id) nocons family(binom) link(logit) trace
from(est2) eval
General model information
------------------------------------------------------------------------------
dependent variable: rep
family: binom
link: logit
denominator: 1
equation for fixed effects rep1 rep2 rep3 rep4 rep5 rep6 rep7 rep8 rep9
Random effects information for 2 level model
------------------------------------------------------------------------------
***level 2 (id) equation(s):
standard deviation of random effect
id1: _cons
number of level 1 units = 4248
number of level 2 units = 472
------------------------------------------------------------------------------
start running on 17 Jun 2005 at 23:51:40
log-likelihood = -2207.4371
finish running on 17 Jun 2005 at 23:51:40
number of level 1 units = 4248
number of level 2 units = 472
Condition Number could not be computed
gllamm model
log likelihood = -2207.4371
last estimates not found
r(301);
/***********************************END**********************************/
Jean-Benoit Hardouin a �crit :
Dear all,
I have a dataset of binary variables (response to 9 binary items). I
explain the responses to these items by a logistic mixed model. I have
a program who estimates the parameters of the model with xtlogit, and
evaluates the model under GLLAMM (with options from(matrix) and
eval). [my aim is to obtain estimations of the random variable for
each individual after GLLAMM with GLLAPRED and to gain time by using
xtlogit instead of GLLAMM]
A simpler version of this program is given below.
My problem is that there is no problem to evaluate the model with
GLLAMM under Stata 8 but I have an error under Stata 9 for exactly the
same program.
The return error is "last estimates not found (r(301)" and I do not
understand what is the problem.
Jean-Benoit Hardouin
The program is :
/*****************************BEGINING OF THE
PROGRAM*******************************************/
use "http://anaqol.free.fr/statalist/jbh.dta"
matrix
est=(-.1059915,2.511868,2.4014077,1.0965434,.34265641,1.1790977,.88322999,1.9542748,-.15445884,1.5169531)
local colnames
forvalues i=1/9 {
local colnames "`colnames' rep:rep`i'"
}
local colnames "`colnames' id1:_cons"
di "`colnames'"
matrix colnames est=`colnames'
matrix list est
gllamm rep rep1-rep9, i(id) nocons family(binom) link(logit) trace
from(est) eval
/*****************************END OF THE
PROGRAM*******************************************/
/***************************RESULTS UNDER STATA 8
******************************************/
General model information
------------------------------------------------------------------------------
dependent variable: rep
family: binom
link: logit
denominator: 1
equation for fixed effects rep1 rep2 rep3 rep4 rep5 rep6 rep7 rep8 rep9
Random effects information for 2 level model
------------------------------------------------------------------------------
***level 2 (id) equation(s):
standard deviation of random effect
id1: _cons
number of level 1 units = 4248
number of level 2 units = 472
------------------------------------------------------------------------------
start running on 17 Jun 2005 at 23:23:35
log-likelihood = -2207.4695
finish running on 17 Jun 2005 at 23:23:36
number of level 1 units = 4248
number of level 2 units = 472
Condition Number could not be computed
gllamm model
log likelihood = -2207.4695
------------------------------------------------------------------------------
rep | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
rep1 | -.1059915 . . .
. .
rep2 | 2.511868 . . .
. .
rep3 | 2.401408 . . .
. .
rep4 | 1.096543 . . .
. .
rep5 | .3426564 . . .
. .
rep6 | 1.179098 . . .
. .
rep7 | .88323 . . .
. .
rep8 | 1.954275 . . .
. .
rep9 | -.1544588 . . .
. .
------------------------------------------------------------------------------
Variances and covariances of random effects
------------------------------------------------------------------------------
***level 2 (id)
var(1): 2.3011467 (0)
------------------------------------------------------------------------------
/***************************RESULTS UNDER STATA 9
******************************************/
General model information
------------------------------------------------------------------------------
dependent variable: rep
family: binom
link: logit
denominator: 1
equation for fixed effects rep1 rep2 rep3 rep4 rep5 rep6 rep7 rep8 rep9
Random effects information for 2 level model
------------------------------------------------------------------------------
***level 2 (id) equation(s):
standard deviation of random effect
id1: _cons
number of level 1 units = 4248
number of level 2 units = 472
------------------------------------------------------------------------------
start running on 17 Jun 2005 at 23:29:04
log-likelihood = -2207.4695
finish running on 17 Jun 2005 at 23:29:05
number of level 1 units = 4248
number of level 2 units = 472
Condition Number could not be computed
gllamm model
log likelihood = -2207.4695
last estimates not found
r(301);
end of do-file
r(301);
--
***************************************************************************
Jean-Benoit Hardouin
Biostatisticien
Observatoire R�gional de la Sant� du Centre
BP 2439
1, rue Porte Madeleine
45032 Orl�ans Cedex 1
t�l : 02 38 74 48 80
fax : 02 38 74 48 81
Email : [email protected]
**************************************************************************
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/