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

From |
David Airey <david.airey@vanderbilt.edu> |

To |
Statalist <statalist@hsphsun2.harvard.edu> |

Subject |
st: Re: labeling question |

Date |
Sun, 28 Dec 2008 20:10:13 -0600 |

Cheers, -Dave On Dec 28, 2008, at 7:41 PM, Joseph Coveney wrote:

Can you add a prefix to the converted-to-string by-variable thatallows forits sorting properly? Perhaps something like: clear * set more off input float byvar byte count 1.1 20 2.3 20 4.6 20 10.2 20 end expand count drop count generate float x = runiform() generate float y = runiform() tostring byvar, replace format("%3.1f") force replace byvar = " " + byvar if length(byvar) < 4 graph twoway scatter y x, by(byvar) exit Joseph Coveney David Airey wrote:I should say also that graph_by doesn't respect the variableformat command,although I think it should.I have a variable that is numeric, like: 1.1 2.3 4.6but about 20 levels to the variable. I want a to use graph_bywhere the byvariable is the above, but I don't want the labels to show thefloatvalues. I could _string_ the numeric variable and graph_by that,but thenthe order is not numeric on the graph.How do I rapidly change a float numeric variable to a labelednumericvariable such that my graph_by is labeled more neatly, and innumericorder?

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

**References**:**st: re: labeling question***From:*David Airey <david.airey@vanderbilt.edu>

**st: Re: re: labeling question***From:*"Joseph Coveney" <jcoveney@bigplanet.com>

- Prev by Date:
**st: Re: re: labeling question** - Next by Date:
**st: Fractional Polynomials for Longitudinal Data** - Previous by thread:
**st: Re: re: labeling question** - Next by thread:
**st: Fractional Polynomials for Longitudinal Data** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |