Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
0answers
11 views

Turning points in a regression STATA

What is the Stata command for calculating a turning point in a regression and analyzing how the data is distributed on each side of the turning point?
1
vote
1answer
69 views

Panel Data and Forecasting

I have balanced panel data for around 130 countries, over three years. I ran a fixed effects regression using 'country' as my panel variable, and adding dummies for 'year'. I want to forecast the ...
1
vote
0answers
21 views

Panel econometrics for marketing mix analysis: how to include spending that affects all the individuals of a panel?

Dear stack exchangers, in the course of an internship at a microfinance bank in Tajikistan, I have been tasked with assessing the efficiency of different marketing expenses. I will try to expose the ...
0
votes
0answers
46 views

How to find a new instrumental variable

I want to replicate the econometrics analysis from the paper by Autor, Dorn and Hanson (2013): The China Syndrome: Local Labor Market Effects of Import Competition in the United States http://...
6
votes
1answer
51 views

What type of graph can be hepful to explain the type of errors that should be used?

I have a regression of wage on several variables, such as education, marriage and so on. I want to explain that it would be a better idea to use cluster errors, since we expect the wage to be ...
0
votes
1answer
54 views

AR 1 Process simulation

I wanted to use STATA for a kalman filter simulation and wanted to go about it the following way 1. Generate iid error terms $$ {e_t}, {n_t}, {u_t} $$ ...
1
vote
2answers
62 views

Econometrics: Omitting a significant variable

Im currently doing a project to construct a demand function for Meat & Fish. My data indicates that Price of Fruit & Veg is individually statistically significant. However, after a omitting ...
0
votes
0answers
282 views

xtsur Stata - seemingly unrelated regression

I have panel data and am using xtsur on Stata 13.1. Briefly, I am trying to estimate by the seemingly unrelated regression(SUR) technique, the relationship between government spending and economic ...
0
votes
1answer
38 views

Categorical variable as explanatory variable (right hand side)

In a linear probability model, or any sort of regression, one can use fixed effect estimation by simply adding in a STATA code i.something. This "something" can be either a village, a county or a ...
0
votes
0answers
21 views

How to create synthetic controls for state-city level groups?

I want to create synthetic controls for state-city level data where a policy is implemented on the state level. The treated group will be the cities of the state that had a policy implemented and the ...
0
votes
0answers
13 views

Using variables as indices, panel data

I am working on a set of fixed effects panel data regressions in econometrics. One of my variables is an index with a base year, another is a percentage, and there are two other variables that are ...
-1
votes
1answer
63 views

How can I achieve better standard error values in Stata?

I am struggeling to find the specific commands to achieve lower standard errors within simple regressions. I would be thankful for your help.
2
votes
0answers
34 views

Using Stata to perform power calculations

I want to use simulation in Stata to help me determine whether or not I will have sufficient statistical power to detect meaningful effects (should they exist) in a given data set using generalized ...
0
votes
0answers
12 views

When running a VAR model on STATA, do we include the differenced variables or the base variables?

The D3 before the variable name means that it is the third difference. Is this how I should be running the VAR model, or should I take the values which haven't been differenced, i.e. just LNM1BRA?
0
votes
0answers
26 views

Analysis of panel data with some data not recorded across all time points

I am currently analyzing a panel data-set which records mothers self rated health, BMI and health behaviors across three time points, five years apart each. As this is panel data, following the same ...
0
votes
0answers
21 views

Stata command to turn strings to binary vars

I was wondering if a Stata command exists to deal with those parts of a questionnaire where a respondent may enter potentially relevant data free-hand and where the researcher might not want to go ...
3
votes
1answer
764 views

Sample weights in Stata: fweight vs. pweight

I'm working with IPUMS ACS and Census data in Stata. I'm interested in learning about income distributions and variability for specific subpopulations defined by education level, occupation, race and ...
1
vote
2answers
952 views

Averaging data over 5 years with Stata or Excel

I need Stata commands or Excel function to calculate the average over 5 years groups of the values in a panel dataset. In particular, this procedure as to take into account the presence of possible ...
3
votes
2answers
7k views

Two-way clustering in Stata

I have a panel dataset and I would like to estimate a linear equation in a fixed effects framework. My question is: how should I implement a two-way clustering? Stata syntax and/or .ado file necessary ...
0
votes
0answers
100 views

estat cv is not allowed after svy: tabulate

I'm getting an error in Stata which tells me that estat cv is not allowed after svy: tabulate. The error message is pretty clear, but I'm having trouble finding the reasoning. CV is the coefficient ...
1
vote
2answers
542 views

Cointegration test in Stata

I am doing a Engle-Granger test for cointegration and I am unsure about some commands. "Cointegration and the ECM" (document) from learneconometric.com says I should use: ...
5
votes
1answer
8k views

Outputting Regressions as Table in Python (similar to outreg in stata)?

Anyone know of a way to get multiple regression outputs (not multivariate regression, literally multiple regressions) in a table indicating which different independent variables were used and what the ...
3
votes
1answer
2k views

Is there autocorrelation in stock prices?

I've heard that stock prices are random. But I know if the price is 15 at one tick, the next price has a range that hovers around 15 because it won't randomly hit 15,000,000 in the next tick. Fist, ...
1
vote
1answer
3k views

Testing for heteroskedasticity in panel data vs time series?

I watched this video on how to check for heteroskedasticity using Stata, and it helped me a lot. But the data example in the video was time series data. He used the Bruesh-Pagan test. ...
1
vote
0answers
38 views

How to know if I've done the necessary corrections to my data so that the regression is valid?

Obviously the data can't be changed to fit a regression, it should be (kind of) the other way around. But, sometimes the data has stuff going on that needs correction. For example, I got raw data ...
1
vote
1answer
61 views

Stata code for linear regression that controls for state effects

Someone told me I should put a variable in my regression to see the state effects. (States in the United States) So he wrote this code and said to put in my variables where the ... is. ...
3
votes
1answer
420 views

Regression with weights

I have a question regarding weighing observations by importance. Suppose I am running the following regression:$$log(y_{it}/y_{it-1})=\alpha+\sum_{i=1}^{N}\gamma_{i}Country_{i}+u_{i}$$ where ...
2
votes
1answer
90 views

Empirical set-up for measuring elasticity with respect to quality in an environment without price

I want to answer the broad question: In the absence of prices, how are decisions made? I have data on the determinants of market share in an environment without prices. So, imagine, person A chooses ...
6
votes
3answers
3k views

Robust Standard Errors in Fixed Effects Model (using Stata)

I'm trying to figure out the commands necessary to replicate the following table in Stata. This table is taken from Chapter 11, p. 357 of Econometric Analysis of Cross Section and Panel Data, Second ...
4
votes
0answers
133 views

Econometrics: Weights in regression that contains averages

Let's say I have a regression of the form: $$y_j=a_0+a_1*T_j+a_2*X_j+u_j$$ where $j$ stands for county, and $y$ and $X$ are averages over worker outcomes/characteristics for each county, and $T$ is ...
4
votes
3answers
624 views

Why does adding a quadratic term to a regression change unrelated coefficients?

I'm in STATA and using 2010 data from Ipums. I'm trying to measure the wage differential between single men, married men, single women, and married women. I ran my first regression and got the ...
3
votes
1answer
57 views

What is the statistical program used in the Worldwide Governance Indicators?

I am interested in understanding the algorithm/methodology of the WGI (the most cited and popular corruption/governance) World Bank Methodology. They try to publish as detailed as possible to the ...
6
votes
2answers
514 views

Papers that use R vs Stata

Is there any way to tell if a paper used R instead of Stata or Matlab for the estimation? I know it doesn't matter for the quality of the paper, but I'd just be interested to see how many papers use ...
12
votes
4answers
703 views

R in econ departments?

According to my personal observation the majority of (prominent) economists prefer use Stata for their statistical analysis and Matlab for other mathematical work. SAS and Excel are also used (...