# 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.

83 questions
Filter by
Sorted by
Tagged with
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 ...
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 ...
1 vote
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. ...
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 ...
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 ...
• 79
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 ...
• 121
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 ...
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-...
• 1,843
1 vote
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 ...
• 21
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&...
• 1,160
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 ...
• 1,843
1 vote
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 ...
• 11
1 vote
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 ...
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 ...
1 vote
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 ...
1 vote
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 ...
• 1,160
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 ...
• 1,160
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$, ...
• 1,843
1 vote
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. ...
• 1,160
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$ ...
• 3,703
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 ...
• 319
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 ...
• 319
1 vote
45 views

### margins with option predict Stata 17

I used to run this code in Stata 15: ...
• 11
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} + \...
• 1,160
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 ...
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 ...
• 21
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 ...
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 ...
• 721
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, ...
• 1,160
140 views

### Curiousity about the significance symbol in Stata?

Today when I read the esttab command of Stata, I saw the star options description: ...
• 1,160
1 vote
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 ...
• 11
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 ...
• 1,160
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, ...
• 1,160
1 vote
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 ...
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 ...
• 29
1 vote
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 ...
• 11
48 views

### generating a variable

I am trying to generate PMdist`i' variables, using the following codes ...
• 121
1 vote
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 #...
• 123
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 ...
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 ...
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 ...
1 vote
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 ...
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. ...
• 31
1 vote
253 views

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 ...
1 vote
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 ...
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.
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 ...
• 23
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. ...