Client Setup Instructions for Small Stata A network license of Stata/IC for Windows has been purchased for the campus by the Sociology Department. This license allows 22 simultaneous users to access the Stata software. Under the terms of the license, this software is for coursework use only!
This copy of Stata may only be used by students and by faculty preparing materials for their students. Use of Stata for research purposes is prohibited. By using this copy of Stata, you agree to this restriction. Requirements Your computer meet the following requirements to use the networked version of Stata:. Windows 7 or newer. 1 GB RAM. 1 GB available hard disk space Because Stata is distributed from one of UNH's servers, you must be connected to UNH's network both to install Stata initially and every subsequent time you wish to run Stata.
Link the Stata Automation library. The following steps worked for me on Windows 10. The Stata executable is most likely in the folder C: Program Files (x86) Stata15. In the installation directory, right-click on the Stata executable, for example, StataSE.exe. Choose 'Create Shortcut'. Dec 25, 2018 Windows › Developer Tools. Stata is a suite of applications used for data analysis, data management, and graphics. All analyses can be reproduced and documented for publication and review. Version control ensures statistical programs will continue.
The three options for being connected are 1) a wired Ethernet connection on the UNH campus, 2) the UNH-Secure wireless network on campus, and 3) a connection via the if you are off campus. Installation Instructions The following instructions will install the required files on your computer for using the networked version of Stata. This procedure only needs to be performed once, but it must be done on every individual computer on which you wish to use Stata. Be sure you are connected to UNH's network as described above before proceeding.
![Windows Windows](/uploads/1/2/5/3/125385688/828551081.png)
Connect to the academic.unh.edu stata share. On Windows 10, click the Start Menu button in the lower left and just start typing the path to the share. Note that you should not enter this address in a web browser like Internet Explorer, Chrome, or Firefox. You will likely be prompted to enter a username and password to get connected. If you are, enter your normal UNH username, prefixed with 'AD ' (e.g. AD djb1) and password. If you are not prompted for credentials to login or receive an error message, try this alternative:.
Open a Command Prompt. Enter the following command, replacing the USERNAME item with your actual UNH username: net use academic.unh.edu stata /u:AD USERNAME.
Enter your UNH password when prompted. To make the Stata window open in Explorer, enter the command: start academic.unh.edu stata In some cases, especially when off campus and connected via the VPN, using an older 'mapped drive' solution will be more reliable:. Right-click on the 'This PC' icon either in the Start Menu or in the sidebar of a Windows Explorer window and select Map Network Drive. Select any unused drive letter in the Drive: field. The default Z: drive is just fine. Enter the path academic.unh.edu stata in the Folder: field. Do not click the Finish button or press Return yet!.
Make sure that the Reconnect at logon box is not checked. Click on the link that says Connect as a different user name. In the Connect As. Dialog box that appears, enter your your username prefixed by AD (e.g.
AD djb1), then enter your AD account password. Click OK in the Connect As. Dialog box followed by Finished in the Map Network Drive dialog box. When the file share window opens, you should see an item named Stata 15 along with a folder with a similar name. Drag the Stata 15 icon either to your Windows desktop or to your Start button. Dragging it to the desktop will place the icon on the desktop background. Dragging it to the Start button will place the shortcut in the Start Menu.
Using Stata Because Stata must run from the UNH server each time, you must be either on the UNH campus on a wired Ethernet connection or using the UNH-Secure wireless network, or you must be connected to the if using the software from off campus. Once you have completed the installation, you can run Stata by double-clicking on the Stata shortcut you placed on your desktop or selecting the shortcut from your Start Menu. Assistance With Stata If you require assistance using Stata, you can get help from the following:. The on-line Help built-in to Stata available via the Help menu.
The. Purchaing manuals from Stata by calling the company at 1-800-STATA-PC or on the Internet at If you believe there is a problem with the UNH networked installation of Stata (application crashes frequently, portions appear to be missing, errors accessing the server), please report the problem at 862-4242.
Uninstalling Stata Stata does not install any of its own files to your computer. The only local item is the shortcut file which you copied to your desktop or Start Menu.
You can delete this item by dragging it to the Recycle Bin.
Stata-exec Send code to Stata from. This package supports Windows, MacOS, and Linux.
While stata-exec will still be supported, I suggest users use the new along with the instead. It can show Stata results inline and works with Windows, macOS, and Linux. News.
Version 1.7.0 supports batch sending of code selection with Run Batch. Version 1.6.0 uses a new program on Linux to send code to Stata. It seems way better; faster pasting and supports unicode characters. Installation In the terminal run apm install stata-exec or go to Settings Install and search for stata-exec. This package depends on, which you should be prompted to install if needed. MacOS MacOS has no dependencies but you must select the flavor of Stata you own in the package's configuration.
Learn more in the below. Then head to the for more details on running code. Windows Windows installation has a few steps, and I haven't been able to perfectly reproduce the working package on all computers.
I hope to make this easier in the future, but for now this will have to do. Sadly, at this point you need administrator privileges to install this for Windows. Make sure you've installed this package and language-stata. In the command prompt, run apm install stata-exec language-stata or go to Settings Install and search for stata-exec and language-stata. Use the default installation settings. Open up an administrator PowerShell (you can right click on the Windows icon at the bottom left and select 'Windows PowerShell (Admin)') and type in: npm install -global -production windows-build-tools This took me 5-10 minutes to install.
![Install Install](http://faculty.econ.ucdavis.edu/faculty/cameron/stata/stata04fileopen.gif)
This is installing Python and other tools needed to install the package in the next step. When finished you should see a long list of names in a tree, like this: `- [email protected] +- [email protected] +- [email protected] `- [email protected] `- [email protected]. Open up Command Prompt (type cmd in the search bar in the dock, and it will be the first result) and type in: cd%USERPROFILE%.atom packages stata-exec npm install winax -python=%USERPROFILE%.windows-build-tools python27 python.exe atom -v Then enter the following, where you need to replace ELECTRONVERSION with the text following 'Electron' in the output of atom -v. Npm rebuild winax -runtime=electron -target=ELECTRONVERSION -disturl=-build-from-source. The following steps worked for me on Windows 10. The Stata executable is most likely in the folder C: Program Files (x86) Stata15. In the installation directory, right-click on the Stata executable, for example, StataSE.exe.
Choose 'Create Shortcut'. Right-click on the newly created 'Shortcut to StataSE.exe', choose 'Property', and change the Target from 'C: Program Files Stata13 StataSE.exe' to 'C: Program Files Stata13 StataSE.exe' /Register. Right-click on the updated 'Shortcut to StataSE.exe'; choose 'Run as administrator' While you're doing that, add the path of the Stata executable to the 'Stata Path' option in the settings.
Restart Atom. Now you can open up a Stata do-file and run code! See for more details. Linux Important: Linux dependencies changed in version 1.6.0. Linux users must install.
On Ubuntu: sudo apt install xdotool xclip Usage Code can be run using either the Command Palette or with keyboard shortcuts. To open the Command Palette, press cmd-shift-P / ctrl-shift-P, and then start typing Stata Exec.
The available commands will be shown in the drop-down menu. The following are the default keyboard shortcuts (on macOS, use cmd instead of ctrl). Keyboard shortcuts can be personalized in your keymap.cson file. Command Default keyboard binding Description Run ctrl-enter Run selection or current line in Stata. Run All shift-enter Run selection or current line in Stata and move down. Run Batch ctrl-alt-d Run selection with do instead of interactively pasting commands.
Run And Move Down shift-ctrl-D Run entire file in Stata. (This runs do '/path/to/current/file') Run Paragraph ctrl-alt-p Run the previous command. Run Previous Command shift-ctrl-C Change Stata's working directory to that of current file. Run Program shift-ctrl-G Run paragraph under current cursor. A paragraph is a region enclosed by whitespace. Set Working Directory shift-ctrl-R Run program definition under current cursor.
See note below. For Run Program, if there exists program drop on the line before program define, the line including the former will be included in the selection. For example, all the lines in the below snippet would be sent to Stata. End Note that end must be on a line by itself to be identified as the end of the program. Configuration All configuration can be done in the settings panel (Settings Packages stata-exec).
The available options are listed below:. Stata Path (used for Windows only).
Absolute path to Stata executable. The default setting will most likely need to be changed to reflect your install location and Stata flavor. Which App (used for macOS only). Select StataIC, StataSE, or StataMP depending on which version of Stata you have.
Select XQuartz if you want to run selections in session of Stata on a remote Unix server. To set this up, you need to have Stata already open in XQuartz; Atom will not open it for you. In your terminal, you'll need to do something like ssh username@host -Y, likely followed by xstata.
This package's commands to run the entire do file and set the working directory are not supported on XQuartz. Advance Position. If checked, move cursor to the next line/paragraph after running the current line/paragraph. Focus Window. If checked, bring the Stata window to focus when sending code. Otherwise, code runs in the background and the screen remains focused on Atom. Notifications.
If checked, a pop-up notification will appear when a paragraph or function is not identified. Skip Comments.
If this and Advance Position are checked, after running a line the cursor will move to the next uncommented line. Paste Speed (used for XQuartz only). This value changes the amount of time the program waits between switching to the XQuartz window, pasting code, and sending 'enter'. The only way to send code to XQuartz is to use the clipboard, and the responsiveness of this process will depend on the speed of your internet connection. If the copy-pasting isn't working, try increasing the value. Decreasing the value will run your code faster. Value must be between 0.1 and 10.
Notes Troubleshooting and Known Issues. Run All doesn't run the last line of the do file. Stata needs there to be a newline character following the last line of text. Add an empty line to the end of the file and it'll work. On Linux, the Stata GUI window must be the only program open with a window title of Stata/. If not, it appears the program will alternate between open Stata windows when pasting. Xdotool seems to let me choose which Stata window to send text to, so maybe that could be put into a more useful function in the future.