r/stata • • Sep 27 '19 All-Seeing Upvote

Meta READ ME: How to best ask for help in /r/Stata

44 Upvotes

We are a relatively small community, but there are a good number of us here who look forward to assisting other community members with their Stata questions. We suggest the following guidelines when posting a help question to /r/Stata to maximize the number and quality of responses from our community members.

What to include in your question

  • A clear title, so that community members know very quickly if they are interested in or can answer your question.

  • A detailed overview of your current issue and what you are ultimately trying to achieve. There are often many ways you can get what you want - if responders understand why you are trying to do something, they may be able to help more.

  • Specific code that you have used in trying to solve your issue. Use Reddit's code formatting (4 spaces before text) for your Stata code.

  • Any error message(s) you have seen.

  • When asking questions that relate specifically to your data please include example data, preferably with variable (field) names identical to those in your data. Three to five lines of the data is usually sufficient to give community members an idea of the structure, a better understanding of your issues, and allow them to tailor their responses and example code.

How to include a data example in your question

  • We can understand your dataset only to the extent that you explain it clearly, and the best way to explain it is to show an example! One way to do this is by using the input function. See help input for details. Here is an example of code to input data using the input command:

``

input str20 name age str20 occupation income
"John Johnson" 27 "Carpenter" 23000
"Theresa Green" 54 "Lawyer" 100000
"Ed Wood" 60 "Director" 56000
"Caesar Blue" 33 "Police Officer" 48000
"Mr. Ed" 82 "Jockey" 39000'
end
  • Perhaps an even better way is to use he community-contributed command dataex, which makes it easy to give simple example datasets in postings. Usually a copy of 10 or so observations from your dataset is enough to show your problem. See help dataex for details (if you are not on Stata version 14.2 or higher, you will need to do ssc install dataex first). If your dataset is confidential, provide a fake example instead, so long as the data structure is the same.

  • You can also use one of Stata's own datasets (like the Auto data, accessed via sysuse auto) and adapt it to your problem.

What to do after you have posted a question

  • Provide follow-up on your post and respond to any secondary questions asked by other community members.

  • Tell community members which solutions worked (if any).

  • Thank community members who graciously volunteered their time and knowledge to assist you 😊

Speaking of, thank you /u/BOCfan for drafting the majority of this guide and /u/TruthUnTrenched for drafting the portion on dataex.


r/stata • • 9d ago

I have vibecoded STATA and it's free

Thumbnail
github.com
72 Upvotes

Still doing a few minor updates, but yeah, it should work.

The Windows version will soon be uploaded

Edit:
Now both windows/mac are fully supported. And the update is done.

For user feedback, I may make a user report function, but maybe not because it would need an internet connection. So I may just write down my email for that in the program somewhere.


r/stata • • 12d ago

Free Student Place on Every Stata Training Course

7 Upvotes

A reminder from the team at Timberlake Consultants that we offer one free student place on every training course we run.

View our upcoming online Stata training courses:

5-6 November 2026

Medical Research Using Stata | Dr Vincent O’Sullivan

Apply here: https://stata-uk.com/medical-research-using-stata.html 

17-19 November 2026

Difference-in-Differences: Recent Developments and Applications Using Stata | Ricardo Mora

Apply here: https://stata-uk.com/dd-recent-developments-and-applications-using-stata.html

23-25 November 2026

Text as Data Methods for Economists: Analysing Text, Image, and Audio with Python | Dr Jaime Marques-Pereira

Apply here: https://stata-uk.com/text-as-data-methods-for-economics.html

28-29 January 2027

Causal Inference and the Interpretation of Treatment Effects Using Stata | Dr Sofia Tsarsitalidou

Apply here: https://stata-uk.com/causal-inference-and-the-interpretation-of-treatment.html

3-4 February 2027

An Introduction to Time Series Panel Data | Dr Jan Ditzen

Apply here: https://stata-uk.com/an-introduction-to-time-series-panel-data.html


r/stata • • 29d ago

Stata on a Mac Studio m5

11 Upvotes

Needing to replace my wife’s desktop that decided it was time to give up. This was the last Windows-based machine that we had looking to see. How well would Stata run on the base Mac Studio m5 with 96 gb of ram and 30-core CPU and 64 core gpu. I do not use the software and am just trying to make it run as effectively as possible . Thanks!


r/stata • • Oct 03 '26

How do I start with secondary data (S&P 500 subsidiary data) in Stata?

6 Upvotes

Hi guys,
I'm a third year phd student and starting a new project where I have to use S&P 500 parent and subsidiary data but I have 0 prior knowledge. People keep telling me to "clean" the data, learn to "read" the data, and "understand" the data but honestly what does that mean? in the end, i should be able to try if I can merge this s&p dataset with another dataset to have a cross-country dataset.

I am struggling to find a way to start doing all of that. I have all the data infront of me downloaded and I have not merged yet, but is there any checklist or anything any structure I can follow to see if I am actually doing the right steps?
My PI has never done secondary data analysis, so I'm alone in this and want to avoid using AI as I cannot really learn and trust that I actually understand what I am doing with the data.
I would appreciate your expertise, experiences and comments. I am also new to reddit, Github etc so also learning everything new...


r/stata • • Sep 25 '26

Stata for Positron

4 Upvotes

Bring your Stata to Positron.

Introducing the Stata Support for Positron extension.

Positron is a GOATed IDE for data science, where you can perform almost everything needed for your research. It has native support for R and Python, but it lacks Stata integration.

Now with this extension, you can use the Stata already installed on your system inside Positron, and bring your do and dta files to Positron.

Stata is a great statistical engine and Positron is a modern IDE. With this extension you can get the best of both worlds.

https://open-vsx.org/extension/abhinavjnu/positron-stata

Do try it out!


r/stata • • Sep 15 '26

Student Scholarship Places Available on Stata Training Courses

7 Upvotes

A reminder from the team at Timberlake Consultants that we offer one free student place on every training course we run.

View our upcoming online Stata training courses:

28-29 October 2026 

An Introduction to Time Series Panel Data | Dr Jan Ditzen

Apply here: https://stata-uk.com/an-introduction-to-time-series-panel-data.html

5-6 November 2026

Medical Research Using Stata | Dr Vincent O’Sullivan

Apply here: https://stata-uk.com/medical-research-using-stata.html 

17-19 November 2026

Difference-in-Differences: Recent Developments and Applications Using Stata | Ricardo Mora

Apply here: https://stata-uk.com/dd-recent-developments-and-applications-using-stata.html

23-25 November 2026

Text as Data Methods for Economists: Analysing Text, Image, and Audio with Python | Dr Jaime Marques-Pereira

Apply here: https://stata-uk.com/text-as-data-methods-for-economics.html

28-29 January 2027

Causal Inference and the Interpretation of Treatment Effects Using Stata | Dr Sofia Tsarsitalidou

Apply here: https://stata-uk.com/causal-inference-and-the-interpretation-of-treatment.html

 

If you're a student interested in attending our training courses but funding is a barrier, we'd encourage you to apply for one of the free student places. Just contact [email protected] or fill out the form on the training course web page.

If you have any questions about the workshops or the student place scheme, we're happy to answer them in the comments.


r/stata • • Aug 28 '26

how to explore data by groups

2 Upvotes

hey swarm.

I'm am stata beginner as i am currently studying journalism science and I need help with some quantitavie research.

I collected multiple articles that are linked to diffrent crimes.

so i have an individual id for the cases then the multiple variables.

here is an example to visualise it: (a shortend version)

caseidtype of articleorigin of suspect was named"xy" was uesd"cd" was used
220public media210
221police report401
221boulevard310

one of my research questions is:
how does media orient on the police report, when writing about crime

so id like the check if police for example did use "xy" did other outlets in this case use "xy" aswell.

i also have a polytome variable so id like to know, if the police police was naming the origin of the suspect, did the other media outlets too?

i am a beginner, but i am willing to download something via ssc.

i am not using ai, as i rather like to ask and connect with people.

thank you :)

EDIT: i had an appointment whit my professor, but as i am doing stata for to group projects, there was not enough time to explain in depth.


r/stata • • Aug 20 '26

Hi I am working on my academic paper. I have repeated cross sectional data. I want to have a summary statistics for different rounds. How can I do this? I have just started the analysis.

1 Upvotes

r/stata • • Aug 19 '26

Question is the t-value in multiple linear regression output one-tailed or two-tailed?

3 Upvotes

hi everyone! I am working on my masters dissertation and I am having some trouble understanding the regression output from Stata.

I am trying to understand my multiple linear regression output from Stata. I understand that the p-value and confidence intervals in the Stata output are two-tailed so dividing them by 2 gives you the one-tailed value. However, I cannot seem to find any resource saying whether or not the t-value is one-tailed or two-tailed. please help!


r/stata • • Aug 18 '26

Free student places available on upcoming Stata workshops (UK Stata Conference, September 2026)

4 Upvotes

Hi everyone,

Just a reminder from the team at Timberlake Consultants that we offer one free student place on every training course we run.

Pre and post the 2026 UK Stata Conference in London, we'll be hosting the following workshops:

📅 1–2 September
AI-Based Optimal Policy Evaluation with Causal Machine Learning – Dr Giovanni Cerulli
Explore data-driven methods for identifying optimal treatment and policy decisions using heterogeneous treatment effects, with applications in socio-economic and medical research.

📅 1–2 September
Data Visualisation using Stata: Graphs You Should Know – Professor Franz Buscha
Learn how to create clear, effective and publication-ready graphs to communicate research findings with confidence.

📅 5 September
Using Stata for the New Difference-in-Differences with Panel Data – Professor Jeffrey Wooldridge
A hands-on workshop covering modern Difference-in-Differences methods in Stata for estimating causal effects using panel data.

If you're a student interested in attending but funding is a barrier, we'd encourage you to apply for one of the free student places. Just contact [email protected]

If you have any questions about the workshops or the student place scheme, we're happy to answer them in the comments.


r/stata • • Aug 07 '26

Question Stata projects for a postgraduate economics student

7 Upvotes

I've just completed my master's in economics. Unfortunately, my college was not very hands on about teaching the much needed tools for data analysis so I know what little of stata I could learn myself.

I'm good with R, know a little bit of Python too, but I want to get a project done in Stata since many research intern/associate positions ask for stata and I have nothing to show for it.

I'm from India and i wanted to use the periodic labour survey or consumption survey data or something like that but their data requires a lot of cleaning and I'm afraid I'm not equipped for doing that in stata just yet.

Please someone guide me regarding this.


r/stata • • Aug 05 '26

Free student places available on upcoming Stata workshops (UK Stata Conference, September 2026)

5 Upvotes

Hi everyone,

Just a reminder from the team at Timberlake Consultants that we offer one free student place on every training course we run.

Pre and post the 2026 UK Stata Conference in London, we'll be hosting the following workshops:

📅 1–2 September
AI-Based Optimal Policy Evaluation with Causal Machine Learning – Dr Giovanni Cerulli
Explore data-driven methods for identifying optimal treatment and policy decisions using heterogeneous treatment effects, with applications in socio-economic and medical research.

📅 1–2 September
Data Visualisation using Stata: Graphs You Should Know – Professor Franz Buscha
Learn how to create clear, effective and publication-ready graphs to communicate research findings with confidence.

📅 5 September
Using Stata for the New Difference-in-Differences with Panel Data – Professor Jeffrey Wooldridge
A hands-on workshop covering modern Difference-in-Differences methods in Stata for estimating causal effects using panel data.

If you're a student interested in attending but funding is a barrier, we'd encourage you to apply for one of the free student places. Just contact [email protected]

If you have any questions about the workshops or the student place scheme, we're happy to answer them in the comments.


r/stata • • Jul 31 '26

linear regression with categorical IV's - checking for multicollinearity

5 Upvotes

Hi all, I am currently doing assumption testing for my thesis and I am confused about checking for multicollinearity with categorical independent variables. Do I run my regression without the dummy coding and then run estat vif or do I run estat vif with dummy coded model?


r/stata • • Jul 22 '26

Cost-quality tradeoff for LLMs writing Stata code

Post image
41 Upvotes

Based on Stata benchmark https://khaledeltokhy.com/benchmarks/


r/stata • • Jul 21 '26

Question Small number of clusters in random effects with clustered standard errors

2 Upvotes

I have a panel dataset with only 11 cross-sectional units (clusters) due to natural sample limitations. I'm estimating a random-effects model using xtreg, re in Stata and clustering standard errors at the panel level. As I understand that conventional clustered standard errors may be unreliable with such a small number of clusters.

Are their any functions in STATA that I can do to handle such a case of small clusters in random effects.


r/stata • • Jul 12 '26

Question Calculating Cronbach’s alpha with multiple imputed data

6 Upvotes

Hi!

I’ve run multiple imputation on my dataset to solve a missing data issue.

I now need to calculate Cronbach’s alpha for my scales, so I have two question:

- do I need to calculate Cronbach’s alpha on my imputed or raw data?

- if yes, how do I do that?

Thanks!


r/stata • • Jul 10 '26

[D] R vs Stata, which is actually better now for ag econ/agribusiness grad school and the field?

Thumbnail reddit.com
2 Upvotes

r/stata • • Jul 03 '26

2026 Econometrics Summer School Cambridge - With Jeffrey Wooldridge and Melvin Weeks | INOMICS

Thumbnail
inomics.com
8 Upvotes

Free scholarship available for the 2026 Econometrics Summer School Cambridge

Timberlake Consultants is offering a free scholarship place for the 2026 Econometrics Summer School Cambridge, taking place at the University of Cambridge with Professor Jeffrey Wooldridge and Dr Melvyn Weeks.

The Summer School is designed for PhD students, researchers, applied economists, and professionals who want to strengthen their empirical skills in causal inference, Difference-in-Differences, machine learning, and applied econometrics using Stata.

The programme includes:

Course 1: An Introduction to Causal Inference and Difference-in-Differences using Stata
Taught by Professor Jeffrey Wooldridge

Course 2: Causal Inference and Machine Learning using Stata
Taught by Dr Melvyn Weeks, University of Cambridge

Participants can attend one course or the full five-day Summer School.

The scholarship covers the full tuition/training fee. Please note that accommodation and travel costs are not included, although accommodation is still available at Cambridge.

More information about the course is available here:
https://inomics.com/course/2026-econometrics-summer-school-cambridge-with-jeffrey-wooldridge-and-melvin-weeks-1554362

To apply for the scholarship, please send your academic transcript and a short motivation letter to:
[email protected]

Feel free to get in touch if you have any questions, we are offering a last minute 30% discount for students and academics!


r/stata • • Jun 29 '26

svy, subpop(if X==1) vs svy, subpop(X)

2 Upvotes

Hello, everyone

I am doing a subpopulation analysis using complex sampling and svy settings. I have a variable (we'll call it X) that is coded as 0 and 1, with missing values. I need the prevalence of variable Y

I have found that there is a difference if I run:

svy, subpop(x): proportion Y

is not the same as

svy, subpop(if x==1): proportion Y

And I can't quite grasp why it is different

Thank you


r/stata • • Jun 28 '26

Question How to combining Forest Plots

2 Upvotes

Does anyone know how to combine gph forest plot files? I created them using the metaforestplot command, but apparently the manual doesn't allow for them to be combined.


r/stata • • Jun 25 '26

how do you import multiple excel files into stata

3 Upvotes

I've been trying to import four excel files into Stata and putting them together.
Each time i import an excel file when i import the second one it erases the first one. I tried using the save and replace on the first file and import the second one, but the moment I do that, I am no longer able to open the excel file both within stata (when importing it) and in my macbook when i just click on the folder and click on the file because it says that it is possibly corrupted, or its no longer excel etc. When I check that same imported excel file by pressing get info, it says it still is an excel file...

i then started using cd folder and then afterwards importing the files again but it has the same problem.

when i give up and use the save and replace and append two files together (i think its append, not merge, because each file represents a year), it says that the variables are byte in master and str in something else, and its impossible to convert all of them to str (they are categorical variables, its a multiple choice questionnaire on excel im importing)

i seriously want to crash out, chatgpt and google gemini isnt working, my fellow research project person doing a parallel project w me is ghosting me, and my supervisor isnt familiar with stata.

someone please help me here :,)


r/stata • • Jun 19 '26

Question Does anyone know any websites where I can learn stata and data analysis for econometrics?

5 Upvotes

r/stata • • Jun 16 '26

Options for too small of ssd for large data sets

5 Upvotes

Hey Stata people,

I have a technical question that may be more of a r/mac question, but I wanted to see if folks here have any experience around this.

I bought a Mac mini with 64 gb of ram, but only a 512 gb HD to run analyses on 20+gb data sets for a research project. However, it turns manipulating the data means temporarily having files larger than the 500GB the hard drive has. I was researching options and it looks like because Mac solders in their parts there are limited options. I can't return the computer and get a larger storage

  • Option 1: I could do is buy a new large external hard drive and move the OS over to it, which seems straightforward enough but would be limited by how the hard drive is connected/me messing something up. But the forums make it seem like this is THE solution.

  • Option 2: Try and just have Stata run analyses in the external hard drive, but in some ways figuring out how to code that feels harder than moving the OS. This is all complicated by having to house the data in a Box folder (for data security reasons) over our a relatively slow internet connection. 

  • Option 3: Either pay for or attempt the relatively complicated SSD swap.

If anyone has any luck with options 1 or 2? Or horror stories that would make me pick option 3?

Thanks for any help!

Tl;dr should I upgrade my Mac mini’s memory by moving the OS to an external hard drive or learn how to run analyses from an external hard drive?