Bookmark and Share

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   Joshua Dewbre <[email protected]>
To   [email protected]
Subject   Re: st: can you change the -collapse- default?
Date   Tue, 3 Apr 2012 20:03:25 +0200

That will work. Thanks for the example, Jorge.

2012/4/2 Jorge Eduardo Pérez Pérez <[email protected]>
>
> 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/

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index