[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: collapse _all
Here's one easy way:
ds id year, not
collapse `r(varlist)', by(id year)
Michael Blasnik
----- Original Message -----
From: "Thomas Erdmann" <[email protected]>
To: <[email protected]>
Sent: Friday, January 26, 2007 8:14 AM
Subject: st: collapse _all
I have different "problem" like with the graphs with adressing all
variables
when I use -collapse- .
What I want to do is basically:
collapse _all, by (id year)
i.e. just taking the mean of monthly observations per year and company.
But
Stata tells me then:
id may not be both target and by()
So is there a way to keep all numerical variable by mean without
specifying
them separately in the clist of -collapse- ?
*
* 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/