Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: Re: st: Combined Horizontal Box Blots do not line up


From   n j cox <n.j.cox@durham.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: Combined Horizontal Box Blots do not line up
Date   Fri, 16 Sep 2005 12:18:25 +0100

That works nicely. A refinement is to add

label def dim 1 "Repair record" 2 "Origin"
label val dim

before the -graph box- call to avoid the
detail of "1" and "2".

One question now is there is a useful and interesting
generalisation that lends itself to automation? That
is, assume

1. There is a response variable.

2. There are two or more categorical covariates.

3. For each covariate, we want the distribution
of the response by its categories.

4. We want the individual displays aligned.

Uses could vary from exploration all the way
to final report.

Nick
n.j.cox@durham.ac.uk

>>> Ulrich Kohler

Thanks Vince, this answered my question thouroughly. I went for the
-reshape- solution, which is far as complicated as I thought.

To round this tread up, here is a template for the auto-data:

. gen cov1:cov = rep78
. gen cov2:cov = 6 + foreign
. label define cov 6 "Domestic" 7 "Foreign"
. reshape long cov, i(make) j(dim)
. graph box turn, over(cov) by(dim, cols(1)) nofill horizontal

Reshape rules!

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index