[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: scientific notation turn off
Nick Cox <email@example.com>
Re: st: scientific notation turn off
Thu, 26 Jan 2012 10:34:37 +0000
Phil Schumm gave very good advice, and I can only add to it, while
commenting that for the specific problem here, Stata offers the
immediate tools and Mata offers extra tools for bigger problems.
It remains striking, and it has been true for several years, that the
most common problem intermediate and advanced users have with Stata
is, in one word, reporting.
That is, Stata commonly provides most or all of the results you need
but for your purposes you want a report containing your results
presented in quite a different way.
Many people, I imagine, would sign up to that as a common desire, but
the devil is in the details. Many of the most popular user-written
programs are focused on reporting, including tabulation, but the very
different kinds of solutions on offer show the great variety of
reporting needs, and of answers to those needs, that users have.
But, positively, there are several substantial programs out there,
which typically do include options controlling formatting.
My other main point is also positive. Even a little programming can
get you a long way. A few people at StataCorp aside, I doubt whether
any programmer understands and routinely uses the entire language and
many very productive people manage very well with a very small
fraction of the language. Anyone who routinely finishes an interactive
session having achieved useful results already understands a lot about
how Stata works and is ready to move into some programming provided
that they are ready to put in a bit of effort and understand that
there will be some frustration in debugging those early programs (and
the later ones too). Kit Baum's book
is excellent, while for reasons that continue to escape me people
routinely overlook the self-contained but detailed introduction to
Stata programming contained in [U]. (The Programming manual [P] is by
contrast more of an advanced reference on Stata programming.)
I will write a Stata column soon on some simple tips and ticks for
controlling output by re-presenting it.
On Wed, Jan 25, 2012 at 11:57 PM, Phil Schumm <firstname.lastname@example.org> wrote:
> On Jan 25, 2012, at 3:16 PM, Doug Hess wrote:
>> Thank you, Nick. Does getting into programming mean learning Mata or something else? I doubt I will do it anytime soon, but it might help to understand what is going on in the background eventually .
> The answer to your question is that it depends on what you're trying to do. Some tasks can be done most easily in Stata (i.e., by using Stata's programming constructs), some tasks can be done adequately in Stata but might be done more easily and/or efficiently in Mata, and some tasks really must be done in Mata. Moreover, once you begin doing some programming in Stata/Mata, you'll see that it's common to combine Stata and Mata code in the same program, using each according to its strengths. The problem is, if you haven't programmed in Stata/Mata before, figuring out what to do in Stata and what to do in Mata can be a difficult call to make. So, it's perfectly reasonable when you're ready to start your first programming project to ask more experienced folks which parts to use Stata for, and which parts (if any) to use Mata for.
> In the case of tweaking an existing program to suit your needs, you'll be constrained (or helped) by the choices made by the original author(s). In this case, the place to start is with
> viewsource <command.ado>
> which will show you the source code for the corresponding command (note that this will only work with commands that are implemented via ado-files, which is the lion's share).
* For searches and help try: