[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
James Muller <james.muller@internode.on.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Data manipulation with Mata (was: [Mata] passing a functionto mata (new question)) |

Date |
Sat, 27 Aug 2005 10:47:07 +1000 |

Can we embed blocks of Stata code in a mata function definition? Haven't looked, but this would be a way. Might be less visually awkward to do this rather than writing little sub-programs to do the external tasks elsewhere.

Reminds me of the Linux goal of getting WINE to run Cygwin, and then have Cygwin run WINE again. Completely pointless, but for some reason a sought-after accomplishment.

Jann Ben wrote:

Stata has very powerful data manipulation functionality and I think it does not make much sense to mimic Stata commands such as, e.g., -generate- in Mata, because Mata will almost sure be slower. My recomondation is to use Mata only for data manipulation tasks that are hard to implement in terms of standard Stata commands or that are really slow in Stata. For example, manipulation tasks that involve temporarily reshaping the data, can be done more efficiently in Mata. For an example see the code of -supclust- (available form SSC). Type

. ssc install supclust

. viewsource supclust.ado

Maybe StataCorp has a different opinion on this.

ben

-----Original Message-----*

From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Fred Wolfe

Sent: Friday, August 26, 2005 4:21 PM

To: statalist@hsphsun2.harvard.edu

Subject: Re: st: [Mata] passing a function to mata (new question)

Bill,

In reference to your comments below, I have found Mata a little daunting with respect to how it might be used for data management and variable manipulation - non-statistical uses. Is there any thought to addressing these uses simply some where? or even having a net course? Your slides from the users meeting were helpful, but more of an overview than an actual tutorial for the uses I describe. Is it worth it for a data manipulator like me to use Mata?

Thanks,

Fred

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

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

**References**:**st: Data manipulation with Mata (was: [Mata] passing a function to mata (new question))***From:*"Jann Ben" <ben.jann@soz.gess.ethz.ch>

- Prev by Date:
**st: RE: tsset and r451** - Next by Date:
**Re: st: RE: Re: RE: Problem areas (R vs Stata)** - Previous by thread:
**st: Data manipulation with Mata (was: [Mata] passing a function to mata (new question))** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |