Questions tagged [stata]

A statistical software package. Use this tag for any on-topic question that (a) involves Stata either as a critical part of the question or expected answer, & (b) is not just about how to use Stata.

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

Convert Quarterly Data into Annual - employment

I am working on the British Labour Force Survey (LFS) data to explore the effects of migration on the native employment rate using spatial correlations approach. Spatial units are 17 regions. ...
0
votes
0answers
19 views

Test of equality between coefficients of different IVs across two different models

Say I have a categorical variable concerning the voting intention for ten parties, and I want to run two separate (logit) models for the voting intention of two parties in particular, Party A and ...
0
votes
0answers
13 views

DiD by using a non-time dummy variable - Methodology Issue

I do have a theoretical question about a difference-in-difference (DiD) model I constructed in Stata. Construction: Over a monthly time span of 7 years I try to analyze the impact of investment-volume ...
0
votes
0answers
18 views

How to find patterns in large panel data set over some years to predict a variable in other years

I have a big panel data set (more than 500 million observations) which contains information on individuals who did or did not receive treatment in certain years (2000-2010). For the years before that (...
0
votes
1answer
15 views

Theoretical explanation of using time-fixed effects

I am currently sitting on an understanding issue. I did some regressions (pooled OLS) on my panel data and hold for time fixed effects. However, I am confused about the interpretation of the time ...
0
votes
0answers
13 views

Exploring long-term associations in STATA [duplicate]

I am looking at the long-term association between a diagnosis of depression and smoking status. I have data collected from the same participants at 2 points in time (i.e. 2 occasions). My data is in ...
-1
votes
0answers
10 views

Robustness check: Two Father-Son tables [closed]

I have a contingency table on father-son occupation data. The sample size is 600. This data includes 300 father-son for whom the occupational information is available at the exact age of their ...
1
vote
0answers
9 views
0
votes
0answers
2 views

How to test for the difference in effect of one independent variable on two dependent variable?

I am currently working on a problem in STATA where I analyze the effect on certain news on the stock prices of 2 companies. I was wondering how I can test for the difference on how the stock prices of ...
0
votes
0answers
19 views

Modelling Unbalanced Panel Data and Time-Invariant Explanatory variables

I am trying to create a regression model analogous to the following conditions: My dependent variable, $Y$, is unbalanced panel data (Investment flows over varying years for almost all countries) My ...
0
votes
0answers
32 views

Negative binominal regression with aggregated data in Stata

A question concerning the effect of aggregation level on negative binominal regression estimates. Example with Stata. Say I have the following data (showing first rows of an an example data): ...
1
vote
0answers
11 views

Same data but different regression analysis results? [closed]

I performed a random-effects model analysis in r studio and got the following results. A college analysed the same data with the same model in state and got different coefficients. What could be the ...
0
votes
1answer
30 views

Poisson regression with strictly positive CONTINUOUS dependent variable

A bit of a background to my questions: I'm coming from the field of strategic management, and the prevalent technique is large sample analysis is fixed-effects or random-effects regression whenever ...
0
votes
0answers
21 views

Interpreting Exponentiated Categorical Variable when Dependent Variable is Log Transformed

I have data on childcare costs and different characteristics of the child. Boss decided it was right to log transform the dependent variable (total annual costs) in all districts, so I must too. We ...
0
votes
0answers
27 views

how can one create a correlation matrix for panel data?

I came across many papers that use a fixed effects panel data model and so I've done the same. However, they also provide a correlation matrix but don't explain how it is derived or how it differs ...
0
votes
1answer
37 views

Why we cannot control for states in a panel data?

I am examining one country over a period of 10 years. I am interested to see whether GDP growth (variable: gdp_growth) had a heterogeneous effect on wages across ...
0
votes
0answers
14 views

Discrete Time Logistic

I'm trying to use panel survey data to determine married event in life using discrete logistic regression. However, some observations enter the survey not the same time as other i.e. some enter in ...
0
votes
0answers
10 views

Squared variable omitted in estimation of Prais-Winsten and Cochrane-Orcutt

I have estimated a model with OLS, where I have found autocorrelation with Durbin-Watson and Breusch-Godfrey. I want to use Prais-Winsten or Cochrane-Orcutt to remove the problem. When estimating the ...
0
votes
0answers
19 views

Can we use macro variable (e.g.gdp_growth) in a panel data?

I am examining one country over a period of 10 years. I am interested to see whether GDP_growth had a heterogeneous effect on wages across people with different educational background. The code below ...
0
votes
1answer
22 views

How can I control for unobserved heterogeneity with cross-sectional data?

I want to run a cross sectional regression for 700 firms in the US to test the impact of working capital on profitability. I specifically want to limit my analysis to the 2008 financial crisis and ...
0
votes
1answer
51 views

How many dummy variables should I use?

I have data of four different regions that will be made into dummies. The problem is one of the regions only has one observation. The others have 30-50 observations. Is it ok to do a multiple ...
0
votes
1answer
39 views

Hypothesis testing: X impact on Y

I am testing the Hypothesis that: (where Y = life_expectancy and X= GDP) Ho= GDP does not affect life expectancy. HA= GDP affects life expectancy. *I already did the model building and got my ...
1
vote
1answer
42 views

How to calculate the fitted values of out-of-sample predictions from conditional fixed-effects Poisson model?

I am trying to calculate fitted values from xtpoisson fixed effects on out-of-sample data. I know how to calculate fitted values for in-sample predictions (using ...
0
votes
0answers
18 views

Interpretation Robustness Check table

we conducted our robustness check for our negative binomial regression using "checkrob" command in Stata (Barslund, Rand, Tarp; 2007). As a result we got the following table. How can I tell ...
0
votes
0answers
26 views

How much more likely is country B to pass a law if country A passed it first?

I have a 9 columns, divided into three sections. Column A is list of countries. Column B has "1" if the country adopted a law, and "0" if it didn't. Column C has date that law was ...
2
votes
1answer
50 views

Comparing the difference in means (group 1 v. group 2 and group 1 v. group 3)

I am a complete beginner in statistics. I have a database in Stata with data on people's cholesterol levels (continuous variable "cholesterol") and an indicator for whether the person is a ...
0
votes
1answer
37 views

interpretation of odds ratio for continuous predictor

I'm examining the influence of new venture product maturity on different type of investments (none, angel, crowdfunding, and series investments). I have multiple measures for each firm. The variable ...
0
votes
0answers
15 views

Resampling with probabilty weights

Is there a method to resample using a set of probabilty weights from survey data? I've only managed to find the gsample module for Stata but it only allows for ...
0
votes
1answer
29 views

Selection equation in Heckprobit

I am trying to implement heckprobit for my dataset. The one issue I am running into is that the stata does not give estimates of the effect of the endogenous binary regressor on the dependent variable ...
3
votes
1answer
120 views

Test for parallel trends in difference-in-difference models with staggered treatment

Following a comment from a previous thread (below), I would appreciate if you may advise me on how to test for parallel trends in Stata for a DiD model with multiple groups and staggered treatment (i....
1
vote
1answer
26 views

Including a variable in the outcome equation only with Heckman probit

In Stata, we are using heckprobit to address an endogeneity concern we have in our model. The model and the instrument used on the selection equation look great and ...
2
votes
1answer
35 views

Heteroskedasticity-Robust Standard Errors in Median Regressions

Does anyone know how to compute heteroskedasticity-robust standard errors in median regressions in R? Assume the following example: ...
0
votes
0answers
16 views

Visualizing Cross-Level Interactions from Stata Output

I am estimating a multi-level ordinal logit model in Stata. The dependent variable is happy (0,1, and 2) The individual-level predictors are married (0/1) and age (continuous). The country-level ...
0
votes
2answers
58 views

Understanding multiple regression coefficients and calculations

The following variables are in the regression below: earnings - yearly wages age educ - years of education woman - dummy married - dummy manager - dummy What is the need/usefulness to have age ...
1
vote
2answers
73 views

Interpretation of coefficient for interaction term in regression

The following is a regression of ln(earnings), i.e. the logarithm of avg annual earnings, on age, age squared, woman (dummy variable 1=woman), education (years of schooling), married (dummy variable 1=...
0
votes
0answers
9 views

How to create a flexible clustering routine?

I have a file of ZIP codes and the number of individuals in each ZIP. Some have two or three people, others have ten. For each ZIP, I merged the closest 10 ZIP codes and their respective number of ...
1
vote
0answers
8 views

How to mitigate the effect of Cross-Correlation between Explanatory and Dependent variables

I have explanatory and dependent quaterly time series variables. Seasonality was removed from both variables. This is cross-correlogram between those two variables generated by Stata. I have tried to ...
0
votes
0answers
18 views

STATA mle function for Mcfadden MNL model

I am estimating the covariates for an aggregate market data set. I am aware of the pre-existing STATA packages out there like mlogit, clogit etc.., however they do not fit my case as I am working with ...
1
vote
1answer
27 views

Which package/module for matching a sample and export the matched sample?

I am looking for recommended procedures/packages for matching samples (with or without propensity scores) to restrict the number of cases in one of two groups. Data are collected with a survey, and a ...
1
vote
1answer
23 views

After running a probit, how can I generate the margins for the whole distribution?

I'm using Stata. I ran a probit of the form $$ \text{outcome}_i = \beta \ f(\text{income}_i) + \gamma\text{ Controls}_i $$ Where $f(\text{income}_i)$ is a fractional polynomial. I'm interested on the ...
2
votes
1answer
20 views

Adding new variable with no historical data (only incremental new data) to existing regression model

I have trained a linear regression model on several hundred observations. I have recently begun collecting data on a new predictor variable and would like to retrain the model with data from this new ...
0
votes
0answers
17 views

Calculate effect size in instrumental variable regression

I'm implementing an instrumental variable regression with a binary endogenous variable (X) and a categorical instrument(Z) consisting of three dummies. The first stage has the following form: \begin{...
0
votes
0answers
18 views

Least square estimator for regression with errors depending on observed values

Consider the following model: $y_i = \beta x_i + \epsilon_i x_i$ where $y_i$, i = 1,2,3...n are observed; $x_i$, i = 1,2...n are known positive constants and $\beta$ is an unknown parameter. There ...
0
votes
0answers
51 views

Boxcox Transformation Error - “contains observations that are not strictly positive”

I am trying to do a Box-Cox transformation for a data set in Stata, using the following code: boxcox Production_qty price technology gender, model(lambda) notrans(gender) It gave me an error saying &...
0
votes
0answers
32 views

Can IWeights Be Used as a Substitute for AWeights When Using XTPOISSON in Stata?

I am using a Poisson-regression fixed-effect model to estimate the effect that automatic voter registration had on the number of new Oregon voters in the 2016 general election. Since Stata does not ...
1
vote
1answer
27 views

small T and large N, problem of collinearity in the model

If I am taking the log of a variable $X$ and also a square term of the variable $X$ on the right-hand side. Say, the equation is $$\log Y_{it} = α + β_1\log X + β_2 \log X^2 + u_i$$ where $Y =$ Waste ...
0
votes
1answer
23 views

selecting principal component for wealth index?

While creating a wealth index using the household asset (dichotomized ), Can we take the second principal component (comp 2) if it has more relative positive eigenvectors (For example: as shown in the ...
1
vote
0answers
29 views

Metaregression - Unexpected high I-squared_res with fair adjusted R-sqare

I was performing a metaregression in STATA, on about 45 studies. Please note that the original meta-analysis has a very high heterogeneity (I-squared: 100%) When I fit my model with covariates, I ...
0
votes
1answer
59 views

Fixed-effects using demeaned data: Why different standard errors when using xt/reg?

My question is equivalent to this post: Fixed-effects using demeaned data: why different standard errors when using -plm-? which asks for getting the same SE in time demeaned regression as in fixed ...
0
votes
0answers
14 views

Adjusted $R^2$ in stata using xtreg mle

I am trying to compare several MLM models run through xtreg mle. e(r2_a) doesn't work with mle. Is there another command or work around to get the values?

1
2 3 4 5
27