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
1 vote
1 answer
37 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 7 categories A, B, C, D, E, F, and G. The participants have each week (36 weeks in total) reported on reasons for using ...
user358238's user avatar
0 votes
0 answers
9 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 ...
user avatar
1 vote
1 answer
43 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 ...
Dang Dinh's user avatar
0 votes
0 answers
34 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 ...
Laura Hill's user avatar
3 votes
1 answer
350 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 ...
jasmine's user avatar
  • 115
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 ...
user avatar
0 votes
0 answers
65 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 ...
Ma0310's user avatar
  • 33
0 votes
0 answers
17 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 ...
Researcher101's user avatar
0 votes
1 answer
39 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 ...
user avatar
1 vote
0 answers
9 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 ...
econ_grad12345's user avatar
0 votes
0 answers
31 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 ...
Lily Tee's user avatar
1 vote
0 answers
44 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 ...
steve's user avatar
  • 57
0 votes
0 answers
32 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 ...
정재호's user avatar
0 votes
0 answers
21 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 ...
Kai's user avatar
  • 1
0 votes
0 answers
24 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, ...
GEGE's user avatar
  • 1
1 vote
0 answers
38 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 ...
user392544's user avatar
0 votes
0 answers
30 views

System GMM yields invalid results while Difference GMM is correct

While studying about GMMs I generated the following dataset to experiment with. ...
aleschory's user avatar
0 votes
0 answers
20 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 "...
Yendao Su's user avatar
1 vote
1 answer
69 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 ...
mridhula's user avatar
1 vote
1 answer
52 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 ...
amedicalenthusiast's user avatar
0 votes
0 answers
10 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 ...
Sven Ferguson's user avatar
1 vote
0 answers
41 views

Trouble understanding difference-in-differences estimates

I am writing with a question about understanding difference-in-differences estimates. I am using a DID approach for my Bachelor's thesis to measure the impact of TBTF reforms on SRISK of G-SIBs in the ...
Rok Milavec's user avatar
0 votes
0 answers
40 views

What are considered "voodoo fit indices" and "true"/"fake" standard errors? SEM CFA

In a conversation about fitting CFA with clusters and sampling weights (inverse probability weights) for ordered/ordinal/categorical data in R Lavaan, fit indices (GoF) were referred to as "...
Johan's user avatar
  • 145
2 votes
1 answer
132 views

Factors or components in Stata and R (psych, lavaan): Confusing method labels and diverging results

I have some trouble translating between Stata and R (psych, lavaan) about factors and components with an interest in the loadings/eigenvectors of the items. I seek to validate results (understand the ...
Johan's user avatar
  • 145
2 votes
0 answers
27 views

How can I possibly test b_4<b_3<b_2<b_1<0 in stata?

I am trying to run a test on coefficients relationship after linear regression. How can i test the following relationship: b_4<b_3<b_2<b_1<0 Thank you!
user389858's user avatar
1 vote
1 answer
19 views

Regression Simulation with random variable - Getting pvalue

i have the following problem: I have a sample of individuals who have opinions on certain subjects. I have to group these individuals randomly in groups the same size for every subject and take the ...
Bestimas's user avatar
0 votes
0 answers
61 views

Case-control study, odds ratio, logistic regression in Stata

I am very excited to be on this forum. I am new to biostatistics and have a question regarding my case-control study, for which I am using STATA for data analysis. All my patients are diabetic. Some ...
curious9's user avatar
1 vote
0 answers
60 views

Interpretation of coefficients in fractional response (probit) model

I am learning about the estimation of fractional response models (those with a lower and upper bound, say 0 to 1), using Stata. I came across this example on the Stata page, which I'm copy-pasting ...
Spotty Giraffe's user avatar
0 votes
1 answer
81 views

Evaluating the quality of matches after Mahalanobis distance matching on stata

I am new to Mahalanobis distance matching and trying to see for information on how I can assess whether the matches I got using Mahalanobis matching are good matches. ...
Alisa's user avatar
  • 5
2 votes
2 answers
165 views

Classic TWFE model: treatment is collinear with the fixed effect

I am conducting a study to estimate the effect of Medicaid expansion on the uninsured rate using a classic Difference-in-Differences (DID) design with two-way fixed effects (twfe) model. My ...
Shadi's user avatar
  • 21
1 vote
0 answers
39 views

How does the psmatch2 command increase sample size in Stata?

I first ran a regression with my dependent variable and covariates: reg dv treatment covar1 covar2 covar4 covar5 covar6 The n=738 Then a used psmatch2 to generate new treatment/control groups ...
education 's user avatar
1 vote
0 answers
19 views

What is the equivalence of optimizer in lmer in R and xtmixed in STATA? [closed]

I was trying to run a multilevel model in R using lmer and my model failed to converge with the default optimizer. Then I used the bobyqa instead of default optimizer and my model converged. Now I ...
Nicki's user avatar
  • 11
0 votes
0 answers
27 views

Probit "Postestimation", in Stata: How do i specify/utilize results of my probit "Classification tables ("estat classification" command)?

Is there a way or a specific command I can use in Stata for more insights and information after i Run the "estat classification" command and classification Tables for my probit model? I know ...
Ruby's user avatar
  • 1
0 votes
0 answers
20 views

Interpretation of regression result

I have a problem related to understanding a coefficient of a regression I have made. Some of the variables in my dataset looks like this: "SKDchange" is the variable of interest as dependent ...
Andreas H's user avatar
1 vote
0 answers
74 views

Fuzzy RDD and IV

I understand the close analogy between a fuzzy RDD and Instrumental Variables estimation. This is clearest in the Wald Estimator. Here is the Fuzzy RDD equation: And here is the (manual) estimation ...
John Smith's user avatar
0 votes
1 answer
70 views

Multiple Linear regression unmet assumptions, what can I do?

I need your help with some work I am doing. Some context first: I am writing a dissertation for my master. The topic is about perceived trust in Smart Home technology. I launched a survey with a ...
Abdel Kdj's user avatar
0 votes
0 answers
54 views

Model selection for multinomial logistic regression in Stata

I have a dataset with a dependent categorical variable N = {1,2,3}, and five independent continuous variables. I am running multinomial logistic regressions for all independent variables together and ...
user372002's user avatar
0 votes
2 answers
154 views

How to address 'immortal time bias' using R - equivalent to Stata stset?

We have a dataset on cancer patients who have consented to join a study after their diagnosis, which could be months or even years later. After some follow-up, an event occurs. We can fit this data ...
zx8754's user avatar
  • 270
1 vote
1 answer
64 views

Cox regression: are my covariates time-variant? what with PH assumption violation?

I was wondering if any have advice on what the correct steps/interpretation are with regards to the following questions on Cox regression. As a side note, I am using STATA MP 15.1 to analyse the data ...
Laura Hill's user avatar
0 votes
0 answers
29 views

How to interpret the interaction coefficient

This is a fixed effect panel model in Stata. Income group has 4 categories: Low income, Lower middle income, Upper middle income and High income. Here below, I put the interaction coefficient values ...
Arpi's user avatar
  • 1
0 votes
0 answers
26 views

Performing a hypothesis test with a difference-in-differences study in STATA

I am trying to write a research method which includes a difference-in-differences study. I survey people's exam results in England & Scotland at t=0, t=1. The mean values of the results are: t=0, ...
Edward's user avatar
  • 1
0 votes
0 answers
177 views

Why are my variables being omitted by Stata?

I'm doing a random effects model. I have a dummy per treatment, which would be "Message", "MessageTax", "Tax" and "Donation" which refers to whether or not the ...
Carolina's user avatar
1 vote
1 answer
236 views

Dummy variable coefficients are getting automatically omitted by Stata : what to do to keep them? [closed]

I am trying to replicate Section 4.1. of a paper "On the Heterogeneous Effects of Sanctions on Trade and Welfare: Evidence from the Sanctions on Iran and a New Database" by Felbermayr et al. ...
Muller I. 's user avatar
0 votes
0 answers
72 views

Estimation of $\mathrm{ARMAX}(1,1,2)$ using panel data

I'm have an application that after some manipulation boils down to an $\mathrm{ARMAX}(1,1,2)$ with some parametric restrictions: $$y_{i,g,t}= k + \beta y_{i,g,t-1} + \epsilon_{i,t}+\beta_e \epsilon_{i,...
Ararat's user avatar
  • 93
1 vote
1 answer
226 views

How to correct for serial correlation in an ARDL model without increasing lags?

I'm currently looking to run an ARDL model - I'm able to compute results that show cointegration, however there is serial correlation when I run the Durbin-Watson and Breusch-Godfrey tests. To correct ...
woodvalestar's user avatar
0 votes
1 answer
45 views

What kind of tests should I run for my master's thesis?

I am analyzing the effect of covid rates and covid lockdown levels on murder and suicide rates for the 50 most populous counties in the U.S. I am not sure what to do to analyze the question in ...
James's user avatar
  • 1
2 votes
0 answers
65 views

Hurdle model for non-count continuous data with both positive and negative values

I am aiming to estimate a hurdle model (where being non-zero is the hurdle) in the vein of Cragg. My data is both positive and negative where the data reflects the difference between a value reported ...
peterr's user avatar
  • 21
0 votes
2 answers
136 views

Can an explanatory variable be both endogenous and exogenous?

I have two dependent variables that I will use in two separate models (namely math_score & language_score) and one independent variable (relative_power) that I will use in both models using Stata ...
Lily RR's user avatar
  • 29
1 vote
1 answer
281 views

3SLS with fixed effects and its interpretation issue

I am running empirical models based on 3SLS due to the potential endogeneity issue caused by simultaneity. So, I opted for 3SLS as my main analysis tool, and I am using reg3 command to analyze it. My ...
Sean Park's user avatar
1 vote
0 answers
29 views

instrument variable for bins of endogenous variable

In my research, for example, trunk is the endogenous independent variable of interest and headroom is the instrument variable for trunk. Both headroom and trunk is continuous variable. Let’s assume ...
qf liu's user avatar
  • 11

1
2 3 4 5
31