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.
1,518
questions
0
votes
0
answers
9
views
Regressions with different time periods
I'm trying to run a pooled OLS and fixed effects regression model using panel data but my problem is that my independent variables are measured monthly while my dependent variable is measured annually....
0
votes
0
answers
10
views
Parallel Trend and DID Estimation
I am trying to estimate the effect of climate shock on hours spent in paid labor by women. The key independent variables are time dummy (that takes 1 if shock happened, 0 otherwise; there are two pre-...
0
votes
0
answers
9
views
Which variables should I include/exclude in my regression analysis for GDP? [duplicate]
I am wanting to establish the impact mobile money has on Kenyan economic growth. I am building my regression model and have collected data for GDP, consumption, government spending, investment, net ...
0
votes
0
answers
15
views
Double selection lasso in and NA's handling
I work in a team where everyone uses Stata, and I work in R.
I have created an efficient workflow that allows me to export the results quickly.
The problem I ran into was when implementing the double ...
0
votes
0
answers
17
views
Controlling for Time-Varying Work Factors in Dynamic DID Analysis: Handling Staggered Adoption of Child Care Leave
I'm working on a dynamic Difference-in-Differences (DID) analysis to assess the impact of child care leave on individuals' wages over their working life. My database includes information on the date ...
0
votes
0
answers
16
views
Using diff-in-diff and fixed effects in Stata
I am doing research using Stata on state-level contraception policy effects on male labour outcomes (e.g. wages). I am utilizing the laws between 1960 and 1976 when Roe vs. Wade was not ruling and the ...
3
votes
3
answers
59
views
About regression analysis with categorical variables
Suppose my dependent variable is a continuous variable and is normally distributed. And I have three IVs: one is a continuous variable, and the other two independent variables are categorical. What ...
0
votes
0
answers
29
views
In Stata or SAS, how do I run a stacked regression with entropy balancing?
My objective is to run stacked regression (DiD) with entropy balancing in the setting of multiple timing for treatments.
Initially, my data consisted of panel data for firm-years. I then stacked this ...
0
votes
0
answers
16
views
Marginal Treatment Effects using MTEFE - postestimation discrepancy
I am currently calculating Marginal Treatment Effects for an outcome Y (earnings) and a treatment D (joining sector 1 vs sector 0), using the MTEFE package from Stata.
I use a separate approach with a ...
0
votes
0
answers
16
views
C-statistic with censoring data
I have analyzed a cancer dataset that contains risk factors and an outcome. However, I am dealing with many observations lost to follow-up and missing values.
I want to obtain the c-statistic, but I ...
1
vote
0
answers
24
views
How to properly estimate a change in slope across a cutoff value
Imagine that you want to estimate whether the slope between y and x changes after a cutoff value. Assume that the cutoff is not at x = 0 but at some arbitrary point c.
I could estimate this two ...
1
vote
1
answer
35
views
When I am comparing RMSFE between a log model and a level model of the same dataset, how should I proceed?
I have created an AR(2) and AR(5) model to forecast my data in stata. The AR(2) model is a level model, while the AR(5) model is a log model. I have computed the RMSFE to compare the forecasting ...
0
votes
0
answers
20
views
Applying OLS regression on model with binary dependent variable to run diagnostic tests
My dependent variable is binary and am therefore using a logit regression but since the diagnostic tests to run for logit are different can I not just regress the variables with OLS and run the ...
0
votes
0
answers
45
views
How can I show my instruments' coefficients in `ivreg2`?
I have a model like this:
Y = endog + exog1 + exog2 + exog3 + entity + time
endog = exog1 + exog2 + entity + time
(where entity ...
0
votes
0
answers
29
views
irt hybrid model predict latent estimate using bayesian method
I'm having some problem about irt prediction model.
When i use irt hybrid model, it cannot predict the latent value even it has successfully converge during the irt model processed.
It contain binary ...
1
vote
1
answer
72
views
Panel Data Estimation and Control Variables
My undergrad thesis has something to do with the relationship between emissions, mitigation-related official development assistance, and governance variables in chosen ASEAN countries. As such, my (...
0
votes
1
answer
43
views
High t statistic with high p value for same variable?
I am trying to do a difference in difference model to compare two cities' police departments' uses of force after treatment from a consent decree. When I run the model with clustered standard errors, ...
0
votes
0
answers
19
views
Best models to determine the impact of demographic variables on chances of winning a competition?
I have a dataset where two teams generally compete against each other. For each team, I've gathered demographic characteristics such as the percentage of males, the number of males, average age, ...
0
votes
1
answer
84
views
Stata and R giving different results for zero-inflated negative binomial regression [closed]
I know this has technically already been asked here, but it doesn't look like the previous question had a reproducible example. I am having the same problem: Very simple, running a zero-inflated ...
7
votes
2
answers
108
views
Cannot seem to find a statistical difference despite a clear difference in the dataset
I've got a dataset of patients with AVM (neurosurgical disease) where you can receive endovascular treatment, surgical treatment or both (usually because endovascular treatment failed).
My outcome is ...
0
votes
0
answers
61
views
Robust Hausman vs Mundlak test to choose between FE and RE model?
What is the difference between robust Hausman test and Mundlak test?
Wooldridge "Econometric Analysis of Cross Section and Panel Data" (Second edition page 870) mentions robust Hausman test ...
1
vote
0
answers
126
views
Calculating Inverse Mills Ratio after Probit
I need to compute the Inverse Mills Ratio after the probit command in Stata. From here, I found that predict IMR1, score, will calculate it and store it in IMR1. I ...
1
vote
0
answers
26
views
Suest for comparing Non linear regressions in Stata but show "estimation sample of the model saved under model1 could not be restored" [closed]
I am using suest to compare the results of Non linear regressions,
...
0
votes
0
answers
66
views
How to deal with insignificance in this regression?
The hw question:
Data set includes:
...
0
votes
0
answers
38
views
Correctly interpreting a two-sample Kolmogorov-Smirnov test and a Kruskal-Wallis test
I want to confirm my understanding of the two tests referenced in the title.
Say I have data on a variable $Y$ from two groups (0 and 1), and I perform the following tests in Stata:
...
0
votes
1
answer
268
views
How to interpret margins in percentage points when the independent variable is a percentage?
I have 2 research questions, dependent variable of 1st question is a binary variable and I use logit regression to estimate it on STATA. The dependent variable of second research question is in ...
1
vote
0
answers
38
views
How to generate placebo test for random false treatment?
I would like to do a placebo test to ensure the result of my main staggered DID results. I have a country-level mandate that goes into effect in different years during my sample period, and in some ...
0
votes
1
answer
29
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 ...
0
votes
1
answer
152
views
whether to adjust or not adjust for baseline in longitudinal RCT
I have a longitudinal RCT data, aiming to compare the superiority of one group with high exercising to the other group with low exercising to see the improving of pain (pain is outcome). Data is ...
1
vote
1
answer
68
views
Appropriate test for comparing categories in two groups?
I have a subset of a data as below: I would like to compare two groups (1/0) for 6 categories for using a medication Every week they could choose more than one option for each question. The number of ...
0
votes
0
answers
50
views
Interpretation of interaction term in Cox regression
I am trying in Stata to analyze the effect of an exposure on the risk of an event, and to determine whether this risk increases or not after a temporal cut-off.
I have two groups of subjects, with ...
1
vote
1
answer
54
views
Estimating risk ratios in Poisson model in Stata
This is a coding question. Basically, in a Poisson model, I would like to calculate risk ratio between 10th percentile and 50th percentile (i.e., predicted value at 10th percentile divided by ...
0
votes
0
answers
57
views
Cox proportional hazard assumption, different results, which to follow
I was wondering if anyone would be able to help me understand whether the proportional hazard assumption is met or not.
For context I have a large dataset with >10 million observations (up to 40 ...
3
votes
1
answer
386
views
How to do maximum likelihood estimation when numerical derivatives cannot be calculated
I am trying to estimate a model from Camerer, Ho and Chong 2002 p151.
$i$ is individual, $t$ is time
$j\in m$ which is action set
$s, a$ are two types of individuals
$s_i(t)$ is chosen action by ...
0
votes
0
answers
29
views
I am using Stata to perform my statistics for a paper. What should I do if a sample is normally distributed but don't have equal variances? [duplicate]
I am using Stata for my analysis. I am analysing a numerical variable over a categorical one (with 3 groups). After confirming they are normally distributed, I did a one way ANOVA test. But Bartlett's ...
0
votes
0
answers
74
views
How to get the pooled estimate and I-squared test for heterogeneity either in STATA or R
I am trying to do meta-analysis using a numerical variable (caculated dose value from different studies) with their sample sizes. I am planning to get the summary of the dose variable as follows with ...
0
votes
1
answer
43
views
GMM and Instruments
I am using GMM for my research work. Previously, I have used ivreg command in stata in which we manually specify the instrumental variable for the endogeneous variable. I was just curious and ...
0
votes
1
answer
70
views
Survival analysis and multilevel logistic regression
I want to do a survival analysis using a discrete time multilevel model in Stata, because the data I have is subject to heaping at certain ages (which explains the discrete time) and because the data ...
1
vote
0
answers
29
views
Some iterations fail is the estimate still good?
0
I am using the csdid command in stata for panel dataset with multiple treatment periods.
When the command is running some of the iterations fail, but I still get an output. I looked in the helpfile ...
0
votes
0
answers
33
views
Diff-in-Diff analysing policy affecting parental income that may affect child health
I am interested to see if a particular policy that increases parental income may impact child health for mothers and fathers. So it would be a diff-in-diff model I would be running. Below is my ...
1
vote
0
answers
48
views
Different PACF plots with different statistical software
I was attempting to replicate the results of a paper and ran PACF plots through R Studio, Stata, and EVIEWS for the UK debt-to-GDP ratio. I received quite different plots in return. Can anyone shed ...
0
votes
0
answers
35
views
Why can't I estimate the target variable when I apply a lag of variable
I applied lag to the exposure variable to adjust for its previous time-point's influence.
However, the coefficients of the lagged variables are estimated to be excessively high, leading to the current ...
0
votes
0
answers
27
views
Cross section or panel data?
I am studying cross-border merger and the post merger peformance differences between when the target firm is in developed country versus developing country. For dependent variable, I am planning to ...
0
votes
0
answers
44
views
Introducing ln variables causes VIF to increase above 10
I am running a regression like this on Stata to do model diagnostics: xtreg lnTobinsQ l.ESGScore l.lnTotalAssets l.Leverage l.CurrentRatio l.PricetoBookValueperShare, fe
When I run the command vif, ...
1
vote
0
answers
58
views
OLS panel vector autoregression with exogenous variables
Are there any R, Stata, or Python packages that allow the estimation of panel VARX models with options to specify fixed-effects and clustered standard errors?
I'm quite desperate at this point and I ...
0
votes
0
answers
51
views
System GMM yields invalid results while Difference GMM is correct
While studying about GMMs I generated the following dataset to experiment with.
...
0
votes
0
answers
33
views
How to deal with a few number of cluster (n<15) for nonlinear?
I am currently trying to address a few number of clusters (n<15) for a nonlinear model (multinomial logit).
I have already gotten an idea from Cameron et al. (2008) for a linear model to use "...
1
vote
1
answer
109
views
Propensity Score Matching at the district level and selecting variables
I am trying to use PSM for program evaluation. My data is at the individual level and I would like to do the PSM at the district level (match districts with each other rather than individuals).
Based ...
1
vote
1
answer
144
views
Non-linear mixed effect model versus linear mixed model with quadratic terms, which one to choose?
I am in the process of modeling the predicted immune response since time to last drug dose. Please note that this is illustrative and not really the real context. I have been using ...
0
votes
0
answers
11
views
Calculate a mean for cases that responded to a minimum number of items in Stata?
In SPSS, you can calculate means for cases that responded to a minimum number of questions. Some example SPSS syntax would be:
COMPUTE variable_new = MEAN.4(x1, x2, x3, x4, x5, x6, x7).
This generates ...