Skip to main content

Questions tagged [stata]

Stata is a general-purpose statistical software package created in 1985 by StataCorp. Most of its users work in research, especially in the fields of economics, sociology, political science, biomedicine and epidemiology.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Modelling a likely unit root process with ARMA? HAC standard errors in python time series packages?

I am working on a project to forecast Canada's GDP. One of the exogenous variables for my ARDL model that I consider is the treasury spread. By plotting its ACF and PACF, I notice that it can be ...
Jun Yang's user avatar
0 votes
1 answer
37 views

Interpretation of OLS regression coefficient of -1.19 when depent variable ranges from 0-100

In an experiment, the participants were asked to allocate 100% of their budget to three categories in different scenarios. Now, I am analyzing the allocation to one particular category via OLS ...
hunter_gatherer's user avatar
1 vote
1 answer
39 views

Plotting a variable over terciles

I am looking to create a figure using Stata, specifically a figure depicting the median change in financial constraints over the years, categorized by terciles of total assets and operating cash flow. ...
user282815's user avatar
3 votes
1 answer
25 views

Ask about the HLT method of "Life cycle wage growth across countries"

paper :https://www.journals.uchicago.edu/doi/epdf/10.1086/696225 deaton imposes linear constraints in order to deal with the collinearity of age-period-cohort. How to implement it through stata? Why ...
Barry Alen's user avatar
0 votes
0 answers
25 views

Regression discontinuity design

I have this setting: Where V is the running variable and M=1 if V>0. It is a sharp RDD. D is a set of period dummies and $\tau$ is the calendar year. Coefficients in vector $\beta$ capture the ...
userF's user avatar
  • 79
2 votes
0 answers
59 views

Staggered difference-in-difference for binary outcome and time-to-outcome

I am trying to find out the effect of a training program for employees by answering 2 questions: Does taking training increase the probability of an employee getting promoted? Does taking training ...
yunchan's user avatar
  • 121
0 votes
0 answers
17 views

How can I perform an analysis of the NHIS imputed income variables?

I have downloaded five family income variables from https://nhis.ipums.org/nhis-action/variables/group?id=economic_income (INCPPOINT1, INCPPOINT2, INCPPOINT3, INCPPOINT4, INCPPOINT5) for they years ...
tryingtogetsmth's user avatar
0 votes
0 answers
89 views

How does one include a "linear time trend"

I've seen this mentioned often in papers, but I never fully got what it means. Below I simulating some diff-in-diff type of data with Stata. How would a "linear trend" be included in a two-...
Papayapap's user avatar
  • 1,843
1 vote
1 answer
43 views

What does it mean to "replace all variables with the residuals after projections on any additional exogenous regressors"

I am conducting IV Regression and to make sure that my instrument is not weak, I want to use Montiel Olea & Pflueger (2013) robustness test. (see: Paper by Montiel Olea & Plueger (2013) ). To ...
Susn's user avatar
  • 21
3 votes
1 answer
572 views

How to deal with "outcome does not vary in any group" when dealing with xtlogit

In my case, I am finding pscore for doing PSM. To get there, I need to run the logistic regression to get the pscore.In my setting, I have 7 countries, all firms in country A have the "treatment&...
Phil Nguyen's user avatar
  • 1,160
6 votes
3 answers
521 views

Regression on individual vs collapsed data

Lots of analysis in the US collapse CPS or Census data and run regressions on the group means. I wonder why not run the regression on the individual data? Absent measurement error, should we expect ...
Papayapap's user avatar
  • 1,843
1 vote
1 answer
774 views

Setting up a panel data set - 2019-2020 sample

Given a 1 year (2019-2020) panel data set with around 3650 observations I have faced some issues when setting up the data in Stata. My intention is to see if the pandemic resulted in any effects on ...
Bella's user avatar
  • 11
1 vote
2 answers
66 views

Meaning of a statistically significant constant in a regression and more

I am running a regression the following way on stata: reg death_rate CPI HDI Where death_rate is the mortality rate of COVID-19 in 2021 (measured as a %), HDI is ...
Coco Garazzo's user avatar
0 votes
0 answers
26 views

How can I perform a simutaneous estimation of binary and multinomial models in STATA?

In particular, I need to estimate at the same time the choice between enrolling at University or not and, if enrolling, which field the individual will choose. In order to so I would need a binary ...
tryingtogetsmth's user avatar
1 vote
2 answers
39 views

Why is Stata omitting some of my variables and mfx not working?

I'm trying to do a probit regression with some categorical and continuous variables but Stata keeps omitting certain variables and even claiming that some can't be used to to collinearity problems (I ...
metrics.queen1's user avatar
1 vote
0 answers
91 views

How to read the results in this case?

From running the code for testing parallel trends, I perform the code below following the suggestion of xtdidregression guideline, page 15. estat ptrends And I got ...
Phil Nguyen's user avatar
  • 1,160
0 votes
1 answer
1k views

Should we use the firm and industry fixed effects together?

I am wondering if we can use the firm and industry fixed effects together in a regression (panel data). In particular, in a regression, whether we should use such a code in STATA ...
Phil Nguyen's user avatar
  • 1,160
3 votes
0 answers
163 views

How to visualize first-stage in IV regression?

I know what matters is the F-Statistic, but for a presentation it would also be nice to add a plot that visually shows the first stage. How to best visualize that? Say you have an outcome $Y$, ...
Papayapap's user avatar
  • 1,843
1 vote
1 answer
63 views

What is the "prediction model" in Dasgupta (2019)?

In a paper, Dasgupta, 2019 used Difference-in-Difference approach to see whether anticollusion laws implemented by different countries (staggered implementation) affect firms financial flexibility. ...
Phil Nguyen's user avatar
  • 1,160
5 votes
1 answer
180 views

Lasso Double Selection Stata Commands

The Belloni et al. 2014 paper develops the theory of Lasso in post-double selection. There are two commands that appear to me to perform this function: $dsregress$ and $pdslasso$. The $dsregress$ ...
Michael Gmeiner's user avatar
-1 votes
1 answer
60 views

What does chi p(q) mean?

It is a beginner question but I did not find a good explanation so I am asking here. Hope that I received the help from the community. Today I run a joint null test individually like that ...
Nguyen Lis's user avatar
0 votes
1 answer
119 views

What are the confidence interval alpha in regression? Why 0.1 is looser than 0.01?

It is a newbie question but I am not sure that I fully understand the confidence intervals. Let's use OLS regression as an example. My understanding is: If alpha=0.05, so it means that OLS regression ...
Nguyen Lis's user avatar
1 vote
0 answers
45 views

margins with option predict Stata 17

I used to run this code in Stata 15: ...
Caterina's user avatar
0 votes
1 answer
121 views

What are the hypothesis and results explaination of joint null test?

When trying to satisfying the paralell assumption in Difference-in-Differences setting, I have the equation: $$ y_{kt} = \alpha_k + \lambda_t + + \delta_{-4} d_{k,t-4} + \delta_{-3} d_{k,t-3} + \...
Phil Nguyen's user avatar
  • 1,160
0 votes
1 answer
108 views

How to estimate a system of equations with missing values in dependent variable with sureg?

I am trying to estimate vote shares of different parties. So, suppose I have 4 parties, each having its own column in the data set. Hence, the sum would be tending to 1. Now, if a party does not ...
Anisha Garg's user avatar
0 votes
0 answers
73 views

Stochastic Optimization

I am working on a Data Panel project that is about macro volatility, taking into consideration some quality indicators. According to my model, indicators definitely determine macro variables. Data are ...
David K's user avatar
  • 21
3 votes
0 answers
416 views

How to estimate an SUR model in R with fixed effects and clustered standard errors?

I want to estimate an SUR (Seemingly Unrelated Regressions) model. I tried using systemfit and its wrapper Zelig. But I am not ...
Anisha Garg's user avatar
2 votes
0 answers
321 views

Difference between AR confidence intervals reported in weakiv versus twostepweakiv

Should the Anderson-Rubin confidence intervals reported in weakiv and twostepweakiv be equal to each other? Sun (2018) does not ...
erik's user avatar
  • 721
0 votes
2 answers
126 views

What does "unit level" mean?

From a discussion here, I saw a comment that Clustered standard errors/variances with clustering at the unit level are equivalent to robust standard errors/variances. If I am examine at firm level, ...
Phil Nguyen's user avatar
  • 1,160
0 votes
1 answer
140 views

Curiousity about the significance symbol in Stata?

Today when I read the esttab command of Stata, I saw the star options description: ...
Phil Nguyen's user avatar
  • 1,160
1 vote
0 answers
15 views

Replacing country-pairs value with if condition

for my Master thesis, I am working with Stata and I am trying to replace countries-pair values equal to the values of other countries-pairs. I start presenting my data: regulatory distance is a ...
Alessio's user avatar
  • 11
3 votes
2 answers
241 views

Will excluding the intercept affect other variables' coefficients?

Is there any explanation if running without intercept caused the change in coefficients of other variables ? I am talking about a panel data regression. xtreg y x ...
Phil Nguyen's user avatar
  • 1,160
5 votes
1 answer
11k views

What are the main differences among xtreg, areg, reghdfe?

Normally, when I run regressions for panel data in Stata using these three commands (xtreg,areg, ...
Phil Nguyen's user avatar
  • 1,160
1 vote
0 answers
29 views

can i treat panel data as pooled data?

I'm working with panel data on Stata. However, I want to perform the ROC analysis and for what I know it is way simpler using the "logit" command instead of "xtlogit". Thus, my ...
Francesca's user avatar
2 votes
0 answers
36 views

Adjusting categorical household income variable for interaction effects

For a research project (RCT) I am working on, I'm trying to identifying how different demographic groups differed in their performance on certain indices over time (like finance, health etc - measured ...
Tara's user avatar
  • 29
1 vote
1 answer
39 views

Interpretation of multinominal logit regression (Stata)

I have a few questions about mlogit. I have a set of independent variables and a categorical, but ordered, dependent variable with three categories (Disagree, Neutral and Agree). The assumptions for ...
Marlen's user avatar
  • 11
2 votes
0 answers
48 views

generating a variable

I am trying to generate PMdist`i' variables, using the following codes ...
Jui Sen's user avatar
  • 121
1 vote
0 answers
82 views

How can I add a multidimensional panel to estimate TFP (year, id, region) in R?

I'm not sure about adding fixed effects for the variables year,id,region (using the estprod library) as in this paper using LP stimator. In the STATA forum ( #18 #...
cdcarrion's user avatar
  • 123
0 votes
1 answer
44 views

Which values to assign to a quantified dummy variable

I am working on a data set from kaggle (https://www.kaggle.com/spscientist/students-performance-in-exams) about how student performance relates to some explanatory variables, such as if the school ...
twoRay's user avatar
  • 1
0 votes
0 answers
782 views

Stochastic Frontier Analysis (SFA) in Stata: Technical Efficiency Estimates

I am prepared to look quite the fool, but hopefully you can help me. I am trying to perform Stochastic Frontier Analysis on a balanced panel dataset by estimating the following model: I think the ...
Econometric Novice's user avatar
0 votes
0 answers
86 views

graph of dependent variable after years of restructuring in panel data

i'm not very able to use stata. For my thesis, I have a panel data(1970-2017) for different countries and a lot of variables. In this dataset, there is a dummy (dhairendH) that is equal to one in the ...
Luca Arcoraci's user avatar
1 vote
1 answer
37 views

Substitute a continuos variable with a categorical one in Linear regression

I am pretty new to econometrics, and I am thinking about substituting a continuous variable (say assets for a company) with a categorical one containing a number based on which quintile the continuos ...
Hustler885's user avatar
3 votes
2 answers
247 views

How to average CDFs of one variable across years

I have wealth-to-income data for 10 years. I computed the cdf of this variable in each year. Now I'm trying to average the cdfs across years. In each each, the number of observations is different. ...
Susan's user avatar
  • 31
1 vote
1 answer
253 views

How to add additional observations to panel data?

this is my sample dataset How can I add for each id a new observation for 2020 month 10 which would be the average of 2020 month 8 and 2020 month 9? I have tried the following, however, it almost ...
user30936's user avatar
1 vote
0 answers
835 views

Stata's "ivregress 2sls" command - generating F-stats to test for weak instrument

I am transitioning to using the "ivregress 2sls" command in Stata for IV estimates. I've been trying to produce F-statistics to test for whether the instrument is weak. I believe that the ...
Colette Salemi's user avatar
0 votes
1 answer
106 views

markov-switching model and stationarity [closed]

To test the structural breaks and to perform markov-switching model in time series data, should i have stationary data. Thank you in advance.
khalilnait's user avatar
2 votes
1 answer
68 views

Should I include country dummies when I combine datasets of 3 countries?

I am currently doing the analysis using firm-level data of three countries combining together. Also, it is a cross-sectional analysis. Therefore, in the regression, I control for industry dummies to ...
Vannaro's user avatar
  • 23
2 votes
1 answer
70 views

Estimating a difference-in-differences with multiple time periods: why do margins results change when you simply change the base period?

My understanding of margins results is that they should not be sensitive to the base period chosen for a categorical time variable. However, I find that they are. ...
sommertime's user avatar
0 votes
0 answers
91 views

How can I add fixed-effect constant variable in Stata?

I want to test a model like this: alpha denotes full set of country fixed effects and delta denotes full set of year fixed effects in the article in which this model is used. My model is similar to ...
Ozlem Akekmekci's user avatar
5 votes
4 answers
14k views

Python vs R (vs Stata): the old battle revisited

I am an avid Python user. I know Stata but I'm not a pro. I don't know R. I do econometrics (mostly time series, but also cross-section and panel), and statistics, and Python seems quite sufficient in ...
Jay's user avatar
  • 51