Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feasibility of a stata interface (with docker) #10

Open
jlperla opened this issue Sep 12, 2019 · 4 comments
Open

Feasibility of a stata interface (with docker) #10

jlperla opened this issue Sep 12, 2019 · 4 comments

Comments

@jlperla
Copy link

jlperla commented Sep 12, 2019

@sergiocorreia (cc @matthieugomez @rsaggio87 ) This is diverging from my original question. We are looking for possible medium-term projects for grad students.

One thing I was wondering about is the feasibility of having stata call out to the something like FixedEffectModels.jl as an experimental interface, but otherwise remain in stata.

What may make this administratively possible is that we could create a docker image that has a FixedEffectsModels.jl prebuilt, with MKL and tweaked libraries. Then users would have no desktop setup (outside of installing docker). The interface could save out the necessary data to be loaded in hdf5 or just csvs, and the either store a file to to be ready for options, or just call it on the command line

Do you think that is feasible in the reghdfeinterface? It is reasonable to initiate shell commands form stata and have control flow around them?

@jmboehm
Copy link

jmboehm commented Sep 12, 2019

This may be a bit off-topic, but I've found it easier to call Stata from julia, than vice versa.
This here is my hacked-together attempt at an interface. This could probably be made much better by implementing a REPL in a running Stata session.

@jlperla
Copy link
Author

jlperla commented Sep 12, 2019

Thanks Johannes. I think it is very on-topic! Although my goal would be to hook the stata-crew into julia rather than the other way around :-)

@sergiocorreia
Copy link

sergiocorreia commented Sep 12, 2019

It is reasonable to initiate shell commands form stata and have control flow around them?

It's possible but a bit tedious, as e.g. Stata will not stop if there is an error in the shell call. There are two other options:

  1. Stata allows for C plugins (SVM, Gtools). Can Julia be available through a C wrapper?
  2. Stata 16 has Python integration. Is there a Py-Julia wrapper that we can then use?

@jlperla
Copy link
Author

jlperla commented Sep 12, 2019

The python is a great idea. While we could in theory call Julia directly (i.e. thorugh https://github.com/JuliaPy/pyjulia ) there are some quirks in the environment. If stata is doing its own thing with python, then I have fears that the setup may be fragile (where the whole point of docker is to remove that sort of fragility so nobody needs to worry about setting up Julia).

However, even if it can't, python is a spectacular glue language so having it call off to a docker image and deal with marshalling the results back and forth could work a lot better than the shell, and be easier to make cross-platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants