Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: matched data error with -clogit-


From   Steve Samuels <sjsamuels@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: matched data error with -clogit-
Date   Thu, 23 Aug 2012 12:12:55 -0400

Not here in Stata 12 latest (08 Aug 2012), which we assume you are using since you don't say otherwise (FAQ 3.3). Note also that the FAQ ask that you try to
reproduce your problem on a publicly available dataset. 

*********************************
sysuse auto, clear
gen mk =substr(make,1,2)
encode mk, gen(id)
bys id: gen ct = _N
tab ct
drop if ct==1
set seed 389511
gen u= runiform()
bys id (make): gen case= (_n==1)
tab case
clogit case mpg, group(id)
predict hat, hat
predict dbeta, dbeta
sum hat dbeta
**********************************


Steve
sjsamuels@gmail.com




On Aug 23, 2012, at 8:06 AM, James Michelson wrote:

To statalistserv,

I'm a graduate student in political science at the University of
Toronto and I'm having problems generating residuals and influence
statistics after a -clogit- model.

I'm exploring the effect of economic variables on coup occurrences
using a case-control research design (see Goldstone et al. 2010 for an
example of this method) whereby my 'control' cases of stability are
matched with my 'treatment' instability cases. My data is currently
stored in typical country-year time-series format. I've have no
problems with the model, storing estimates, or even creating predicted
probabilities.

The problem arises after I've run my model:

. clogit <DV: coup> <IVs: inflation, infant mortality, growth, etc.>
if nomiss = 1, group (controlsvo)
...
<output>
...
. predict hat, hat
"diagnostics after clogit are allowed only for 1-M matched data"
r(459);

My control cases were generated as follows:
mark samplesvo if (coup5 == 0 & f.coup == 0 & coup == 0) | (coup == 1)
[i.e., no coups in a seven year period | coup-year]
egen controlsvo = concat (year region) if samplesvo == 1

My data is not consistently matched (1:N) across control groups but
varies from group to group. I've been reading through Scott and Long's
'Regression Models for Categorical Outcomes Using STATA' and the STATA
reference manual but I don't know if it's a problem with either my
panel-data format or my coding.

Where am I going wrong? I would happy to send along my code and data
if needed. The model works well enough but I would really like to
check for outliers and influence statistics.

Thanks in advance!

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


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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index