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 on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: Useful labelling of dummy variables following logit


From   Tim Evans <Tim.Evans@wmciu.nhs.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Useful labelling of dummy variables following logit
Date   Thu, 25 Aug 2011 14:13:17 +0100

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)
> last estimates not found
> 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-.

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------
*
*   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/

_DISCLAIMER:
This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.


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