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: SPost question- recording confidence intervals with praccum


From   Tom Wood <[email protected]>
To   [email protected]
Subject   st: SPost question- recording confidence intervals with praccum
Date   Fri, 2 Apr 2010 00:09:28 -0500

With the very useful SPost commands, I have encountered a quirk with one of
its command. When I use praccum after estimating a model, it refuses to
record the confidence intervals for the point estimates. I intend to use
both sets of confidence intervals with the twoway (rarea... syntax.

So I do the following


quietly probit y x1 x2 x1*x2.....

forvalues count = -4.238(.28)1.68 {        # these are the range of my x1
variables. I intend to include this on my x axis
2. local int = `count' * .125              # i will hold x2 at this value
for one plot
3. quietly prvalue, x(x1=`count'  x1*x2=`int' x2= .125) rest(mean) brief
level(95) delta
4. praccum, using(mlc) xis(`count')
5. }

praccum, using(mlc) gen(lct)

which generates this output

   Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+----------------
----------------------------------------
       lctx |        25   -2.268302    1.822032    -4.4389     .93107
      lctp0 |        25    .4578371    .0320936   .4017878    .496179
      lctp1 |        25    .5421629    .0320936    .503821   .5982122

new variables cannot be uniquely named or already defined #And THIS is the
big obstacle
r(110);

Ideally, I'd like another four columns of variables- lctp1ub, lctp1lb,
lctp0ub,  lctp0lb- the default of the prgen command.

I appreciate I'm probably missing something simple in my loop- could anyone
tell me the proper way to specify this loop?


Thanks, I really appreciate the assistance

Tom Wood
Political Science
University of Chicago

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index