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: Data Envelopment Analyses


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: Data Envelopment Analyses
Date   Tue, 30 Jul 2013 14:12:02 -0500

Yes with -levelsof- and -foreach-.

For example:

sysuse auto,clear
gen dmu = _n
levelsof foreign, local(levels)
foreach l of local levels {
    dea weight length = mpg if foreign == `l', saving(dea_ouptput_`l')
}
clear
fs dea_o*
append using `r(files)'
tobit theta price foreign , ul(1)


Scott


On Tue, Jul 30, 2013 at 1:51 PM, Sarfraz Khan <[email protected]> wrote:
> Thank you Scott. This is very helpful. One more question if you can
> answer please. You can run regression by group (e.g. regression by
> each industry group). Can one also do the above analysis by group. I
> tried to use bysort function but didn't work. Is there a way to do run
> above command by group?
>
> Again, thanks everyone for replying.
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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