Announcement

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

  • Converting *.mo file to a text file

    Dear Statalist
    Could anyone help me on converting a *.mo file to a text file (or .mata)?
    I am using a virtual computer to access my data, and the Stata installed in the virtual computer does not have any access to the internet connection. I need to use the rdrobust function for my analysis, but I can only import certain types of files to the virtual computer such as a pdf, a word or an excel file. So far, I copy and pasted the *.ado codes (rdrobust.ado rdplot.ado etc.) in to a word file, and was able to save them as .ado files in the virtual computer. However, I could not use the rdrobust function as I could not import the .mo files associated with the function to my virtual computer.
    I read the MATA manual, and found out that mata mosave would allow to save mata codes as a .mo file, but could not find how to open a .mo file and save it as a mata file.
    I would greatly appreciate it if I could get some help on opening a rdrobust_bw.mo file (or any other .mo file), and saving it into any other text format so that I can copy it into a word file.
    Thank you.

  • #2
    Some of my work is done in a similar environment. The individuals responsible for reviewing files being brought into or out of the virtual computer have rules similar to those in your environment.

    However, there are system administrators responsible for setting up the virtual computer and installing software, and it is they, not I, who has responsiblity for installing the necessary software, including community contributed commands like rdrobust.

    There is no way to reverse-engineer Mata source code from a Mata object file.

    Comment


    • #3
      Depending on how exactly the files that you bring into the environment are checked, temporarily changing the file extension from .mo to .txt might suffice. If it does not, I would either contact the administrators or ask the authors of rdrobust whether they are willing to provide the source code.

      Comment


      • #4
        The source code is available here, under rdrobust_functions.do:
        https://github.com/rdpackages/rdrobu...e/master/stata
        It creates all the .mo functions after you run it.

        Comment

        Working...
        X