Bookmark and Share

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


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

st: Error r(110) to create least square means/PROC GLM in SAS


From   Julia Smith <[email protected]>
To   [email protected]
Subject   st: Error r(110) to create least square means/PROC GLM in SAS
Date   Thu, 26 Sep 2013 13:20:19 -0400

Hi Stata users,

I am using Stata/MP v12.1 to calculate demographic-adjusted least
square means of a variable Y for each county in the US (using steps
from an old Stata support FAQ available:
http://www.stata.com/support/faqs/statistics/least-square-means/).
The variable Y is continuous, and the variables agegroup, racegroup,
and gendergroup are categorical variables which take on 5, 3, and 2
values, respectively.  county is a categorical variable that takes on
3000+ values (which I suspect may be the source of the problem).

After running the following:
xi: reg Y i.agegroup i.racegroup i.gendergroup i.county
adjust _Iagegroup_2=.1 _Iagegroup_3=.1 _Iagegroup_4=.1 _Iagegroup_5=.1
_Iracegroup_2=.1 _Iracegroup_3=.1 _Igendergro_2=.1, by(county) se
replace

I get the error:
__00002S already defined
r(110);

-set trace- indicates that -adjust- is trying to generate a temp
variable "__00002S" based on one of the _Icounty values.  I'm
wondering if it is possible that the large number of county values is
creating too many temp values, causing the program to recycle temp
value names, and therefore killing the program with r(110) (and I've
already -set maxvar- to the limit).  Any advice on how to deal with
this issue is greatly appreciated.

Alternatively, for users familiar with SAS, I'm essentially trying to
create the equivalent to PROC GLM in Stata (see below): suggestions
for a better way to do this are also appreciated.

proc glm;
  class county;
  model Y = agegroup_2 agegroup_3 agegroup_4 agegroup_5 racegroup_2
racegroup_3 gendergroup_2 county;
   lsmeans county;

Thanks in advance,
Julia
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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