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: profile.do file
From
Stas Kolenikov <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: profile.do file
Date
Wed, 27 Nov 2013 08:42:10 -0600
My profile.do defines keyboard shortcuts for debugging do- and
ado-files (which I am not even sure are documented, they must have
been with me since Stata 5):
set more off
set tracedepth 2
global F4 discard;
global F5 set trace on;
global F6 set trace off;
It also opens the -cmdlog- file, or at least tries very hard to figure
out where to go if I have four instances of Stata running:
capture noi cmdlog using `"h:\log\cmdlog-`=subinstr(
trim("`c(current_date)'"), " ", "-", . )'"'
forvalues k=1/10 {
capture cmdlog using `"h:\log\cmdlog-`=subinstr(
trim("`c(current_date)'"), " ", "-", . )'-log`k'"'
}
Unlike NJC, I like -set type double-, as most of the time I need to
keep my numbers accurate, as opposed to reproducing somebody's quirks
due to the default -float- type.
-- Stas Kolenikov, PhD, PStat (ASA, SSC)
-- Senior Survey Statistician, Abt SRBI
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer
-- http://stas.kolenikov.name
On Wed, Nov 27, 2013 at 7:44 AM, Lisa Wang <[email protected]> wrote:
> Thanks Nick.
>
> The set type to double is more like an example but appreciate you
> pointing this out to me.
>
> Would you mind elaborating in a simple example of how I could set up
> graph options in the profile.do file
>
> Also, apart from doing -set XXX - what other options can be specified
> in this file? Any suggestions would be appreciated.
>
> Thanks again,
> Lisa
>
> On Wed, Nov 27, 2013 at 9:04 PM, Nick Cox <[email protected]> wrote:
>> The profile.do file belongs in the same directory or folder as your executable.
>>
>> By the way, I think you need a really good reason to -set type
>> double-. There has been much discussion of this, e.g.. a long thread
>> starting at
>>
>> http://www.stata.com/statalist/archive/2011-02/msg00943.html
>>
>> A profile.do file could also include setting up your favourite graph
>> scheme and settings for -netio-.
>>
>> Nick
>> [email protected]
>>
>>
>> On 27 November 2013 08:34, Lisa Wang <[email protected]> wrote:
>>> Hi Statlisters,
>>>
>>> This seems like a very basic question. I have a question about the
>>> profile.do do-file as in how do I create it (as I know that Stata will
>>> automatically execute it).
>>>
>>> Do I just have it as a new do-file then where would I store this for
>>> it to execute? Would I store it in my pwd of the dataset I am using or
>>> in the actual file that Stata is installed?
>>>
>>> Apart from defining settings like:
>>> set logtype text
>>> set type double
>>> set more off
>>>
>>> What else could I define?
>>>
>>> I already read the help profilew entry but would like some more
>>> suggestions or pointers. Thank you.
>>>
>>> Regards,
>>> Lisa
>>> *
>>> * 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/
>> *
>> * 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/
> *
> * 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/
*
* 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/