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

st: Re: automatic line graph generation from tabsum function


From   "Scott Merryman" <merryman@icehouse.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: automatic line graph generation from tabsum function
Date   Fri, 26 Jul 2002 21:58:44 -0600

If I understand this, you want to graph the mean number of claims by month
for each census tract.

First generate the mean number of claims:
egen average_claim = mean(num_claims) by(census)

Sort variables so they are in the correct census and month order:
sort census month

graph:
by census: graph average_claim year, c(l)

Scott


----- Original Message -----
From: "Gretchen Caspary" <gretchencaspary@fsc-research.com>
To: "Statalist" <statalist@hsphsun2.harvard.edu>
Cc: "Michael J. Sullivan, Ph.D." <MichaelSullivan@fsc-research.com>
Sent: Friday, July 26, 2002 6:53 PM
Subject: st: automatic line graph generation from tabsum function


> Graphics question.
>
> I want to be able to automatically produce a series of simple line graphs.
>
> I am doing a tabsum with "census tract" and "month" on the x and y axis,
> respectively, and showing mean "number of claims" in the body of the
table:
>
> tab census month, sum(num_claims)
>
> which will produce a big table.  I want to be able to *automatically*
> generate a line graph for every "census tract" row.
>
> Can this be done?
>
> Thanks, Gretchen
>
>
> Gretchen Caspary
> Research Analyst
> Liability Management Systems
> FSC Group
> 415.777.0707
> 415.777.2420 (fax)
> gretchencaspary@fsc-research.com <mailto:gretchencaspary@fsc-research.com>
>
>


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