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

# Re: st: Useful labelling of dummy variables following logit

 From Nick Cox To statalist@hsphsun2.harvard.edu Subject Re: st: Useful labelling of dummy variables following logit Date Thu, 25 Aug 2011 14:25:21 +0100

```A very bad idea in my view. A model is not fairly reported if you
don't pay attention to all its predictors. But you can always go
-yla(1/`=_N')-.

Nick

On Thu, Aug 25, 2011 at 2:13 PM, Tim Evans <Tim.Evans@wmciu.nhs.uk> wrote:
> Nick, Maarten
>
> I think I have what I want now and agree that the graphical presentation is nicer/easier to interpret. Thanks for your help.
>
> However, I think I have one final thing to achieve. I only want to plot the variables that have significant p values - this is fine as I can drop them at the end of the code:
>
>        replace parm = "baseline odds" if parm == "_cons"
>        drop if p <=0.05
>        egen axis= axis(z), label(parm)
>
>
> However I want to incorporate into the graph code the fact that the signifcant number of variables may change between each regression so the 'ylab(1/14, valuelabel ang(h) noticks' command may change so that I have 12 variables rather than 14 in another regression - but I'd like Stata to do this rather than me having to pick out the number after each regression as I have a number of regressions to do.
>
>
> **BEGIN EXAMPLE****
> twoway bar  estimate axis, xscale(log) base(1) horizontal barw(.5) ///
>                           xline(1) ylab(1/14, valuelabel ang(h) noticks) ||             ///
>                  rcap min95 max95 axis, horizontal               ///
>                           legend(order(1 "point estimate"            ///
>                                                        2 "95% conf. int.") pos(6))   ///
>                           xtitle("odds ratio") ytitle("")
> ***END EXAMPLE***
>
> Best wishes
>
> Tim
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten Buis
> Sent: 25 August 2011 09:30
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: Useful labelling of dummy variables following logit
>
> On Thu, Aug 25, 2011 at 10:08 AM, Tim Evans wrote:
>> Thanks for the help again. I've tried your example below, but it fails on the following code:
>>
>> parmest, norestore eform
>> Invalid estimates matrix: e(b)
>> r(301);
>
> The example works on my computer, which makes it hard to diagnose the
> problem. Did you run the entire example (including the -logit- model)?
> Do you have the latest version of -parmest-? I got mine by typing -ssc
> install parmest, replace-.

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