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

Simple tutorial on using PyTwoWay from stata 17 #41

Open
tlamadon opened this issue Oct 21, 2022 · 6 comments
Open

Simple tutorial on using PyTwoWay from stata 17 #41

tlamadon opened this issue Oct 21, 2022 · 6 comments

Comments

@tlamadon
Copy link
Owner

  1. install using a shell command: shell pip install pytwoway
  2. pass data from Stata to Python
  3. run estimator
  4. extract results back to stata and show
@adamoppenheimer
Copy link
Collaborator

Once I'm on winter break I'm going to try out pyoxidizer to get a standalone executable.

Once that's working I'll update the Stata interface so you'll be able to run the Stata command with just the executable even if you don't have Python.

@tlamadon
Copy link
Owner Author

Thanks Adam, I might try to put something simple together, just because some people are asking. Hope all is good!

@adamoppenheimer adamoppenheimer pinned this issue Oct 23, 2022
@tlamadon
Copy link
Owner Author

I created a page on the wiki and a stata branch. See details here:

Pytwoway with Stata on Apple silicon (M1, M2, etc)

@shoham-b
Copy link

Since using pandas and numpy, I think it would be better to use PyInstaller.
See https://pyoxidizer.readthedocs.io/en/v0.9.0/packaging_additional_files.html#installing-unclassified-files-on-the-filesystem

@adamoppenheimer
Copy link
Collaborator

Thank you for the recommendation @shoham-b.

I will take a look at the link you posted once I get to creating the executable.

@tlamadon
Copy link
Owner Author

tlamadon commented Oct 27, 2022

The way I have moved the library to off line servers if by using conda-pack. We could provide a simple tutorial for it. If you can set it up locally using conda, you can then relatively easily pack it into one file that you can then move to the server.

In all cases, that file (or any executable) will end up pretty large, at least several 100M.

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