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: marginsplot error, with continuous variable and factor variables


From   vwiggins@stata.com (Vince Wiggins, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: marginsplot error, with continuous variable and factor variables
Date   Fri, 24 Aug 2012 12:29:53 -0500

Carla Valle-Painter <Carla.Valle-Painter@cic.gc.ca> writes that
-marginsplot- is exiting with the admittedly-unhelpful error,

    _marg_save has a problem.  Margins not uniquely identified.
    r(9999);

The error message is not helpful because it is triggered by an
impossibility trap in -marginsplot-.  This is essentially a message
intended for the developers of Stata that we have a bug.  All
-marginsplot- knows is that the results it has fetched from -margins-
do not seem to uniquely identify the margins and because of this
-marginsplot- cannot go on.  This is either a bug in -margins- or in
the utility that fetches results from -margins-.

We have tried variations of the sequence that Carla describes but cannot
reproduce the problem.  I have contacted Carla off list to get more
information and will report back to the list when we know more.



   Best wishes,
 
-- Vince 
   vwiggins@stata.com

 
 
------------ Original message ---------------------------
 
From: "Valle-Painter.Carla" <Carla.Valle-Painter@cic.gc.ca>
Subject: st: marginsplot error, with continuous variable and factor variables

Hi,

I am getting an error from marginsplot and I cannot understand what it means:

I am using Stata/IC 12.0

I estimated a logit model, with many independent variables which are factor
variables, and a few continuous variables.

I wish to do a marginsplot of a dummy variable (Qc) across the values of one
of the continuous variables.  I wanted to do this setting the factor variables
at particular levels, rather than setting them "atmeans" or "asobserved"

So I ran the following command (note etc. etc. means there are other variables
set at particular values that I am not listing here):

     . margins Qc, at(pgrcount = (0 (1) 18) sex=2 lis5tiles7=3 agecats=3 etc. etc.)

where pgrcount is my continuous var (really it is a count), ranging from 0 to
18.

I do get the margins for this, and then try to run the marginsplot as follows:
 
     . marginsplot, xdimension(pgrcount) xlabel(0 (1) 18)

But I get this error message:

Variables that uniquely identify margins: pgrcount Qc uslist :_at15 _m1:
_marg_save has a problem.  Margins not uniquely identified.
r(9999);

Thanks in advance to anyone who can throw some light on this.

Carla 

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