Nick,
This is the reference to which I was referring in yesterday's
chat: http://www.jstatsoft.org/v23/s01/
Regards,
Bob
Robert A. Yaffee, Ph.D.
Research Professor
Silver School of Social Work
New York University
Biosketch: http://homepages.nyu.edu/~ray1/Biosketch2009.pdf
CV: http://homepages.nyu.edu/~ray1/vita.pdf
----- Original Message -----
From: Nick Cox <[email protected]>
Date: Friday, July 24, 2009 1:14 pm
Subject: st: RE: Adding a Reference Point to a -tabplot- Graph
To: [email protected]
> You'd need to replicate -tabplot-'s internal logic. So for example the
> height of the top of each bar is in essence
>
> category_code (1, 2, 3, etc.)
>
> PLUS
>
> [(Frequency in cell)/(Maximum frequency over all cells)]
> * Maximum height of bar
>
> So you'd need to replicate that kind of calculation for whatever you
> were superimposing on top.
>
> My guess is that this is entirely possible but not trivial.
>
> Nick
> [email protected]
>
> Marshall Garland
>
> I'm attempting to generate graphs across multiple levels (schools)
> that display the percentage of students within a particular school and
> within a particular subgroup (let's say, gender, or ethnicity, etc.)
> that accomplished a particular task. The data are longitudinal, so
> these outcomes are captured across multiple years (two, to be
> precise). Thus, my X and Y variable are both categorical. -tabplot-,
> of course, works brilliantly for this.
>
> However, I would also like to add a reference point to each category
> that shows the aggregate percentage (that is, across all schools in a
> given year, not just a particular one) for each task for each student
> subgroup. It seems as though some overlay using the addplot option for
> -tabplot- would work, but I can't seem to figure out how to do this.
> I've experimented with using -combine graph- to add additional figures
> of the aggregate results for each year, but I'm unhappy with the
> results.
>
> Here's my syntax thus far:
>
> ***figure 2***
> levelsof school_name, local(levels)
> foreach school_name of local levels {
> tabplot ethniccode enroll_type_final, by (hs_grad_year)
> percent(ethniccode hs_grad_year) ytitle(, orient(hor)) ///
> scheme(s2color) showval ///
> ylabel(, nogrid) legend(nostack rows(1) size(small) nobox
> region(lcolor(white) lwidth(vvvthin))) ///
> xtitle(`school_name') xtitle(, justification(center)) ///
> by(, note(, color(white)))
> }
>
> My data look like this:
>
> Student School Year Y X
> 1 A 2007 1 3
> 2 A 2008 3 2
> 4 B 2008 4 5
> 5 B 2007 1 4
> 7 C 2007 2 2
> 8 C 2008 4 4
>
> Any ideas or recommendations would be greatly appreciated.
>
> Cheers,
>
> -Marshall
>
> -tabplot- reference:
> http://www.stata-journal.com/sjpdf.html?articlenum=gr0004
> *
> * 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/
>
> *
> * 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/
*
* 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/