Announcement

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

  • #46
    Hi David,

    I have installed the latest julia and reghdfejl packages and have the latest julia software and jl works fine. However, when I run reghdfejl, the command seems to run without error but gives me no regression output. Any idea how to debug this?

    . Example below:
    Click image for larger version

Name:	Screenshot 2024-11-06 162201.png
Views:	1
Size:	9.9 KB
ID:	1767158


    Thanks in advance,
    Chris

    Comment


    • #47
      Thank you Christopher Johns for alerting me to this problem. It looks to me like the issue is that new version of Julia, 1.11, changes how arrays are stored. This breaks my Stata plugins, when they try to copy data between Julia and Stata. I will probably just recompile the plugins for Julia 1.11, and then require that version going forward.

      For the time being, I suggest you revert to Julia 1.10. For example, in Mac/Linux/Windows terminal window you can do:

      Code:
      juliaup add 1.10
      juliaup default 1.10
      Then restart Stata.

      This won't remove 1.11 from your computer, but it will make it load 1.10 when you (or one of my Stata plugins) starts Julia. Let me know if that doesn't work.

      Comment


      • #48
        Alright, I think I have fixed the issues. Because of some breaking changes in the C-language interface in Julia 1.11, the julia and reghdfejl packages are now not only compatible with Julia 1.11, but require it.

        The new versions should be posted on SSC soon. To install them from Github, do
        Code:
        net install reghdfejl, replace from(https://raw.github.com/droodman/reghdfejl/v1.0.8)
        net install julia, replace from(https://raw.github.com/droodman/julia.ado/v1.1.0)
        Also, make sure you are running the latest version of Julia. These command lines should work, from inside Stata:
        Code:
        ! juliaup default release
        ! juliaup up
        (That will make the latest downloaded release the default Julia version, and update to the latest release.)

        Then restart Stata.

        Let me know if you run into problems.

        Comment


        • #49
          Thanks David for your fast response! It works perfectly now!

          Comment


          • #50
            Originally posted by David Roodman View Post
            Alright, I think I have fixed the issues. Because of some breaking changes in the C-language interface in Julia 1.11, the julia and reghdfejl packages are now not only compatible with Julia 1.11, but require it.

            The new versions should be posted on SSC soon. To install them from Github, do
            Code:
            net install reghdfejl, replace from(https://raw.github.com/droodman/reghdfejl/v1.0.8)
            net install julia, replace from(https://raw.github.com/droodman/julia.ado/v1.1.0)
            Also, make sure you are running the latest version of Julia. These command lines should work, from inside Stata:
            Code:
            ! juliaup default release
            ! juliaup up
            (That will make the latest downloaded release the default Julia version, and update to the latest release.)

            Then restart Stata.

            Let me know if you run into problems.
            Dear David,

            I am installing the commands as instructed. However, I have encountered some issues as follows:

            When I typed
            Code:
            ! juliaup default release
            Stata returned
            Code:
            zsh:1: command not found: juliaup
            When I tried typing
            Code:
            jl: "Hello world!"
            It said
            Code:
            Could not load plugin: /Users/dungle/Library/Application Support/Stata/ado/plus/j/jl.plugin
            (error occurred while loading jl.ado)
            r(9999);
            When I tried this on terminal
            "% open -a [StataMP]"

            It returned
            "zsh: no matches found: [StataMP]"

            I am using StataMP on a M3 MacBook (Apple chip).

            Thank you.
            Last edited by Dung Le; 11 Nov 2024, 03:32.

            Comment


            • #51
              Did you install Julia as described in "help jl"?

              Comment


              • #52
                Originally posted by David Roodman View Post
                Did you install Julia as described in "help jl"?
                Yes, I installed Julia by using this code
                Code:
                 ! curl -fsSL https://install.julialang.org | sh -s -- -y

                Comment


                • #53
                  If you are getting an error when you try to run a juliaup command, that is an operating system or Julia issue, not an issue with my software. And if that StataMP command doesn't work, that's an OS or Stata issue. So I won't try to help much with those.

                  I would open a terminal window and see if the "curl -fsSL https://install.julialang.org | sh -s -- -y" command works properly. And also whether typing "julia" in the terminal works.

                  Comment


                  • #54
                    I manage to fix it by uninstalling the julia dmg version and reinstall it by command line.

                    ------------

                    I met the following problem in Mac OS apple silicon, it's kind of strange that stata jl cannot access the local julia, juliaup.

                    Code:
                    .  jl: s = 0; for i in 1:10 s += i end; s
                    
                    
                    Attempting to add 1.11 channel to the local Julia installation.
                    This will not affect which version of Julia runs by default when you call it from outside of Sta
                    > ta.
                    To learn more about the Julia version manager, type or click on !juliaup --help.
                    This version of the julia Stata package is only guaranteed stable with Julia 1.11.
                    
                    
                    '1.11' is already installed.
                    Starting Julia
                    Can't access Julia and Juliaup. jl requires that Julia be installed, along with the version mana
                    > ger Juliaup, and that
                    you are able to start both by typing "julia" and "juliaup" in a terminal window (though you won'
                    > t normally need to).
                    See the Installation section of the jl help file.
                    r(198);
                    Last edited by Haojun Xie; 17 Dec 2024, 02:17.

                    Comment


                    • #55
                      Make sure to install Julia according to the directions at "https://julialang.org/downloads". Perhaps that's what you meant by "reinstall it by the command line."

                      Per the message above, are you "able to start both by typing 'julia' and 'juliaup' in a terminal window"?

                      You can try starting a log file, doing "set trace on", then trying to call julia, then sending me the log.

                      It is working for me on Apple silicon.

                      Comment


                      • #56
                        I guess stata jl package cannot correctly call julia installed in the Applications by dmg installer, since I can run julia and juliaup in terminal but it seems that stata jl cannot find the command. Not quite sure about the mechanism behind it. Perhaps you could add instructions to not use the dmg installer of Mac.

                        The speed of this package is amazing compared to the original reghdfe, many thanks for your work!

                        Originally posted by David Roodman View Post
                        Make sure to install Julia according to the directions at "https://julialang.org/downloads". Perhaps that's what you meant by "reinstall it by the command line."

                        Per the message above, are you "able to start both by typing 'julia' and 'juliaup' in a terminal window"?

                        You can try starting a log file, doing "set trace on", then trying to call julia, then sending me the log.

                        It is working for me on Apple silicon.

                        Comment


                        • #57
                          Dear David,

                          I'm trying your package to deal with an estimation with several dimensions being absorbed. I need to compute margins after my estimation to make some plots. I read from the documentation that the constant is always absorbed, so I get margins centered around zero, not at the variable original levels. I tried to save fixed effects to check if I could get the margins in levels, but I got an error in this case.
                          My estimation goes like this:

                          eststo mod1 : reghdfejl y i.male##(age nat show i.marst i.ed_a# #i.ed_w) [aw=w8], absorb(city job1 job2 job3, savefe)

                          After this I got the message

                          "[FE] city_w invalid name
                          r(198)

                          And a variable "FE1" shows up in the dataset

                          Two questions:
                          1. Is there a bug in the reghdfejl code since I'm getting this error? Or I might be doing something wrong on my side?

                          2. More generally, what is a reasonable strategy to obtain margins in the original level of y using reghdfejl?

                          Thanks a lot




                          Comment

                          Working...
                          X