I'm working on a program that will generate a series of tables for
various academic departments. I want each department's tables to be
together so I've written a fairly generalizable "byable" program as
follows:
>program define neat, byable(recall)
> version 9.2
>
> marksample touse
>
> display "Total enrollment"
> tab newterm if `touse'
>
> display "Total enrollment by credit status"
> tab regcred if `touse'
>
> end
>
>sort subject
>by subject: neat
I'd like to enhance the output by displaying the current subject_value
in the title of each table (the current subject_value is printed at the
top of each series of tables automatically). I've tried a variety of
statements including:
>display subject " subject"
>display `_byvars' " _byvars"
However, I always get the first subject_value, rather than the current
subject_value as indicated by the -> automatic heading.
Does anyone know how I can capture the current subject value and print
it out as part of the program?
Any suggestions would be greatly appreciated!
Thanks.
Catherine
Catherine A. Jackson, Ph.D.
Director of Research and Planning
Shasta College
Redding, CA
(530) 242-7679
*
* 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/