Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resetting the environment

    Sorry to trouble anyone. I have a new computer and have downloaded Stata 16 anew. Is there a way to revert to the settings I had previously. I tried to reset reveal codes to F11 but I could find no way to change the default setting (as well a other codes). Any help would be appreciated. Thanks,

    Ric Uslaner

  • #2
    Euslaner It's unclear to me precisely what you want to do ... but my guess is that you need to create a "profile.do" file that sits in the directory that your Stata opens in by default. And then in the profile.do, you can have commands that map function keys to specific tasks. Re mapping, a quick web search took me to http://chrome-extension://efaidnbmnn...uals13/u10.pdf. In your profile.do, you can also reset the default ado directories and do other things. E.g., my profile.do includes lines like the following
    Code:
    sysdir set OLDPLACE "d:\home\stephenj\ado"
    
    set varabbrev off, permanent // essential for reproducible code

    Comment


    • #3
      If you mean resetting (or transferring) your preferences for the Stata windows and some of the options for its behaviour, those are governed, at least in Windows, by registry keys. You're better off to simply redo those yourself and then save the profile.

      Comment


      • #4
        Originally posted by Stephen Jenkins View Post
        Euslaner It's unclear to me precisely what you want to do ... but my guess is that you need to create a "profile.do" file that sits in the directory that your Stata opens in by default. And then in the profile.do, you can have commands that map function keys to specific tasks. Re mapping, a quick web search took me to http://chrome-extension://efaidnbmnn...uals13/u10.pdf. In your profile.do, you can also reset the default ado directories and do other things. E.g., my profile.do includes lines like the following
        Code:
        sysdir set OLDPLACE "d:\home\stephenj\ado"
        
        set varabbrev off, permanent // essential for reproducible code
        If I did this would it be possible to include in profile.do statements such as:

        set F1 = open
        F2 = search

        etc or wouldn't this work? Thanks for any help.

        I do have another query. I have written an ado file that I have added to my personal.ado file. It is called pf.ado. I have transferred it to my new computer on the personal.ado directory but get the response:

        pf pid2 evangclx
        command pf is unrecognized
        r(199);
        where pf is a variation on the probit command that automatically gives changes in probabilities. Is there a way to use this ado file? Thanks again.

        Comment


        • #5
          The second question is easier for me to try to answer.

          Type

          Code:
          adopath
          to see where Stata is inclined to look for your code files (ado and sthlp and any others). EIther you ensure that those files of yours are moved to one of those places, or you add a suitable place to the adopath.

          Code:
          help adopath
          says more.

          On the first question, macro list yields a list like this, at least for Stata 19.50 for WIndows, as I open it: your Stata may differ slightly.

          Code:
          . mac li
          F12:            search
          S_level:        95
          F1:             help advice;
          F2:             describe;
          F7:             save
          F8:             use
          S_ADO:          BASE;SITE;.;PERSONAL;PLUS;OLDPLACE
          S_StataMP:      MP
          S_StataSE:      SE
          S_OS:           Windows
          S_OSDTL:        64-bit
          S_MACH:         PC (64-bit x86-64)
          You can define global macros for what happens with other function keys. I've never seen the point of this myself and -- more importantly for you -- I can't remember where this functiinality is documented. Otherwise put, it is easier for me to remember describe than to remember that I want describe and that pressing F2 gets me there.

          Comment


          • #6
            Euslaner #4: you appear not to have followed the link to a manual entry that I provided (where there was/is an answer to your question). Here's the link again: https://www.stata.com/manuals13/u10.pdf. The top of the page has text like

            If you wanted F3 to mean list, you could type . global F3 "list " In the above, F3 refers to the letter F followed by 3, not the F3 key. Note the capitalization and spacing of the command.
            and then continues with discussion of variants on this, and mentions "profile.do"

            Comment


            • #7
              Thanks Nick and Stephen

              Comment

              Working...
              X