Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: can you change the -collapse- default?
From
Jorge Eduardo Pérez Pérez <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: can you change the -collapse- default?
Date
Mon, 2 Apr 2012 17:25:43 -0400
As far as I can tell this would require modifying the .ado file for
-collapse-. It is easy, however, to define your own -collapse- with
the median as default:
program define mycollapse
collapse (median) `0'
end
sysuse auto, clear
collapse price, by(foreign)
list
sysuse auto, clear
collapse (median) price [pw=mpg] if turn<46, by(foreign)
list
sysuse auto, clear
mycollapse price [pw=mpg] if turn<46, by(foreign)
list
_______________________
Jorge Eduardo Pérez Pérez
On Mon, Apr 2, 2012 at 4:03 PM, Joshua Dewbre <[email protected]> wrote:
> Dear Statalist,
> At times I find myself using official commands interactively a great
> deal. In these instances it would be nice to change the default
> settings of, e.g., --collapse-- to (median) as opposed to (mean). Is
> this possible? I use Stata 11.2.
> Thanks,
> Josh
> *
> * 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/