Install Stata Linux
Pip (recursive acronym for “Pip Installs Packages” or “Pip Installs Python“) is a cross-platform package manager for installing and managing Python packages (which can be found in the Python Package Index (PyPI)) that comes with Python 2 =2.7.9 or Python 3 =3.4 binaries that are downloaded from python.org. Suggested Read: How to Install Latest Python 3.6 Version in Linux. Downloading and installing Stata 16 on Linux Step 1: Download Stata Go to The following screen will show. We will have sent you. Step 2: Installing Stata. Stata for Windows® Windows 10. Windows 8. Windows 7. Windows Vista. Windows Server 2016, 2012, 2008, 2003. 64-bit and 32-bit Windows varieties for x86-64 and x86 processors made by Intel® and AMD. Stata for Mac® Stata for macOS requires 64-bit Intel® processors (Core™2 Duo or better) running macOS 10.9 or newer; Stata for Linux.
Stata is a software package designed to perform a variety of data analyses. NGOs commonly use it, and in the realm of academia, it is used in a variety of disciplines.
User-friendly statistical analysis
Some of the things users can do with Stata include organizing data, a variety of statistical analyses, and making regression models.
Stata is a statistical software package that was created for general use. It is common to find people using this product if they are apart of an NGO or doing a study related to the social sciences.
This statical analysis program has multiple strengths. For starters, the learning curve isn’t as steep as it is with other similar products. If you need help with Stata, there is support given in over 13 languages, including Hindi, Russian, and Spanish. This program is one of the easiest to use when it comes to performing analysis on datasets on one table. Finally, graphs are not only easy to create in this software, but there is a built-in graph editor which allows you to change colors, axis labels, scale, pretty much anything on the graph.
Stata Install Estout
This program does have some quirks to it. The program works well with only one data table. If you try to do analysis involving multiple tables, it is possible, but it’s a fairly complicated process. Another issue is this program doesn’t have a lot of data packages pre-installed, as similar software does.
Where can you run this program?
In addition to Windows, Linux, and Mac operating systems, this product is also available in a web browser.
Install Stata
Is there a better alternative?
Yes R, SAS, MatLab, and SPSS are better than Stata because the scope of what Stata can do is fairly limited. All the other alternatives allow its users to work off of multiple datasheets, which is something lacking in Stata.
Our take
This software is good for people just starting to get into more advanced statistical analysis, and it doesn’t have a steep learning curve when compared to similar products.
Should you download it?
No. Unless you are just starting out with analysis, it’s an easy to use statistical package, but it is really only a step above Microsoft Excel. There are better options.
16
A recent exchange on Twitter reminded me of my switch to R from Stata. I’d started grad school in 1999, before R hit 1.0.0, so I’d been trained exclusively in Stata. By 2008, I had way more than the proverbial 10,000 in-seat hours in Stata, and I knew all the tricks to make it do just what I wanted. I was even Stata Corp.’s on-campus rep at my university. Still, I’d started dabbling in R. Then as now, there were specific things R could do that Stata couldn’t.1 But how to get those advantages without throwing out my hard-earned skills and starting over as a complete n00b? The answer was: a little bit at a time.
Fortunately, it’s not difficult to switch back and forth within a given project, so you can start bringing some R to your Stata-based workflow while leaving it mostly intact. Then, if and when you find yourself doing more in R than in Stata, you can flip and start using Stata from within R.
So, install R and let’s get you started.
Running R from Stata
The trick to running R from within your do-file is first to save the data you want to pass to R, then call the .R
file with the commands you want to run in R (the “R script”), then—if necessary—reload the R output into Stata.
While it’s also possible to use Stata’s shell
command to run an R script (for illustrative purposes, let’s pretend it’s called my_script.R
), Roger Newson’s rsource
module makes it particularly easy. Install it as follows:
Unfortunately, the information rsource
needs about your R installation is a bit different depending on your OS, but once installed, adding this platform-independent code to your do-file will run the script:
Of course, you could choose to skip the whole if-else and just include the line that runs on your machine, but that’s not doing any favors to your collaborators or anyone else trying to reproduce your results. You might also just prefer to specify the rpath
and roptions
in your profile do-file,2 but again, then you’ll need to let others know to do the same or they won’t be able to run your do-file.
Note, too, that if you don’t have much R code to run, it might be easiest to just keep it in your do-file rather than using a separate script. You can do this using the terminator
option to rsource
, though a downside to this approach is that it doesn’t allow you to if-else the rsource
command by your OS. In the do-file below, I also use the regsave
module to save my results to pass them to R; install it using ssc install regsave, replace
.
Running Stata from R
So maybe you’ve gotten to the point where you spend more of your time in R than in Stata, but there’s still a few parts of your work that you just want (or need!) to keep in Stata. Running a do-file (my_do_file.do
) from inside your R script is easy with Luca Braglia’s RStata
package:
On this side as well, it’s possible to set the arguments just once, in your .Rprofile
file. In my case, these two lines do the trick:
Since Stata isn’t free and open-source, it’s even more likely that others will have different setups anyway, so this may make the most sense. Be sure to comment your code to clue people in, though.
If you just want to use a single Stata command RStata::stata
3 will do that for you, too, with no need for a do-file. From the RStata package documentation:
Summing Up
Moving parts of your work from Stata to R is totally feasible. Lots of people (for example, in the thread that touched this post off, Steve Rodgers) really want to take advantage of the superior graphics capabilities of R, especially the ggplot
ecosystem, even while sticking to Stata for most of their work. Once your feet are wet, you may then decide R’s many other benefits (the free part, the super-helpful community, the transferable job skills you can teach your students, the free part, the cutting-edge stuff available years before it’s in Stata, the way RStudio makes it dead easy to do reproducible research through dynamic documents and version control, and, once again, the free part) make switching over all the way to be worth the additional marginal effort. Or you may not.
I completed the transition in three or four years, at my own pace: when I felt comfortable moving another chunk of my workflow over to R, I did, but not before. If I were doing it over right now, with the tidyverse packages dramatically reducing the slope of the learning curve, I might move faster, but there’s no rush, really. Do what works for you.
Stata Download
Additional Notes
Install Stata Linux
- This post by John Ricco describing how to translate Stata data cleaning commands to the
dplyr
idiom will likely be helpful to those new to tidyverse-style R and wanting to move quickly. - I also ran across the Rcall package while writing this up, but I haven’t tried it. You may find it useful.
- OTOH, these 2010 slides by Oscar Torres-Reyna were definitely useful to me back in the day, but as they pre-date both the tidyverse and RStudio—the wonders of which really cannot be overstated—they’re now more likely to cause you unnecessary confusion than help you if you’re a new switcher. Better to steer clear.
- Great complete treatments on how to do stuff in R:
- Modern Dive, by Chester Ismay and Albert Y. Kim
- R for Data Science, by Hadley Wickham and Garrett Grolemund
- A bit older, but I still love Winston Chang’s Cookbook for R as a reference, especially the Graphs chapter
- RStudio’s Cheat Sheets are also great references.
- When you’re ready to take the step to using R more than Stata, you’ll want to get fully set up on RStudio, which provides a front end for running R and can integrate with git and GitHub for version control (you will want this). The best resource that I’ve found for this process is Jenny Bryan’s Happy Git and GitHub for the UseR.
- The R community on StackOverflow is full of helpful people. As your Google-fu develops, you’ll find that links to StackOverflow are most likely to get you where you need to go.
- There are so many fantastic #rstats (dozens? hundreds?) follows on Twitter. With apologies to the—seriously—hundreds of others who’ve taught me tons of stuff over the years, I’m going to grit my teeth and rec just five to get you started: Mara Averick, Jenny Bryan, David Robinson, Julia Silge, and Hadley Wickham.
References
Bryan, Jenny. 2018. “Happy Git and Github for the useR.” http://happygitwithr.com/.
Chang, Winston. “Cookbook for R.” http://www.cookbook-r.com.
Ismay, Chester, and Albert Y. Kim. 2018. “Modern Dive: An Introduction to Statistical and Data Sciences via R.” https://moderndive.com/.
Kastellec, Jonathan P., and Eduardo L. Leoni. 2007. “Using Graphs Instead of Tables in Political Science.” Perspectives on Politics 5(4): 755–71.
Wickham, Hadley, and Garrett Grolemund. 2017. R for Data Science. O’Reilly. http://r4ds.had.co.nz.
Then, for me, it was multiple imputation, parallel computation, and the dot-and-whisker plots of regression coefficients introduced to political science by Kastellec and Lioni (2007). On this last one, see also the dotwhisker package. Now my list is different, but even longer. That’s not what I want to get into in this post, though. This post is how, not why.↩
See the technical note to the help file for rsource for details.↩
In the argot (heh), this means the
stata
command in theRStata
package.↩