Statalist The Stata Listserver


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

st: From: "Li, Xue" <[email protected]>


From   [email protected]
To   [email protected]
Subject   st: From: "Li, Xue" <[email protected]>
Date   Thu, 7 Jun 2007 12:55:10 -0500 (CDT)

Hi,

I am a STATA user. My Data has four columns: cluster, povind, wt1 and
intercept. There are 7591 clusters, povind is the binary outcome ( 0 or
1), wt1 is the total number of 1's in a cluster. intercept is always equal
to 1. I want to run a logistic regression with povind as outcome, no
covariate and only one random intercept(discrete random effect).I am using
the following code. However before the program finishing running, I got an
message "error in remcor",  and at the time the maximum gateaux derivative
is 2.1682588 with 17 discrete mass points for the random intercept.
What does this mean? About one third of 7591 clusters have observations
all equal to 1's.

My code is as follows.

cd I:\group\Project1\xueli\SupplementStudy\Massachusetts\Stata
log using try15, text

infile cluster povind wt1 intercept using
I:\group\Project1\xueli\SupplementStudy\Massachusetts\Stata\MA.dat,clear
eq cons: intercept
list in 1/20, clean


**NPMLE
/*1 class*/
gllamm povind, i(cluster) eqs(cons) w(wt) l(logit) f(binom) nrf(1)  nip(1)
ip(f)


/*2 and above CLASS*/
matrix a = e(b)
local k = e(k)
local lik = e(ll)

local i=2
global HG_error=0
while `i'<=20&$HG_error==0{
gllamm povind, i(cluster) eqs(cons) w(wt) l(logit) f(binom) nrf(1) adoonly /*
*/ ip(f) nip(`i') from(a) gateaux(-15 15 2000) lf0(`k' `lik') trace

local i=`i'+1
matrix a=e(b)
local lik=e(ll)
local k=e(k)
}

Thanks very much.

xue

*
*   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/



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