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
2 votes
1 answer
337 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 ...
1 vote
1 answer
3k views

Cohen's Kappa for more than two categories

I have data set of teacher's evaluation rated by 4 different raters. The teacher's are evaluated for 13 different categories for example (Interaction with students, lesson delivery etc). All of the 4 ...
1 vote
1 answer
40 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
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 ...
0 votes
1 answer
1k 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 ...
9 votes
1 answer
6k views

Polychoric PCA and component loadings in Stata

I’m using Stata 12.0, and I’ve downloaded the polychoricpca command written by Stas Kolenikov, which I wanted to use with data that includes a mix of categorical ...
0 votes
1 answer
250 views

Interpreting Significant Interaction Term Odds/Hazard Ratio with Binary Variables

I am running a cox proportional hazards regression with Stata and am having trouble interpreting the interaction term between two binary categorical variables. For simplicity, here's a summary of the ...
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 ...
3 votes
1 answer
349 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 ...
2 votes
1 answer
1k views

AIC and BIC formula for multiple logistic regression in survey data in Stata

In the recent article, for fit models, we only use parameters: crude, adjusted odds ratio, and p-value. The model fit criterion other researchers usually used it is the likelihood ratio test, but ...
3 votes
1 answer
806 views

Is it possible to make an in-sample dynamic forecast / prediction for an ARIMA model?

We are trying to check to what extent the changing X-values might explain the observed trend in Y. By "in-sample" I mean: using the same data as was used for the model building. By "dynamic" I ...
2 votes
2 answers
779 views

Comparing Heckman and OLS results

Is it possible to compare coefficients across an OLS model and a Heckman model that has the same covariates (plus the inverse Mills ratio)? The coefficient of my main variable of interest changes when ...
1 vote
1 answer
273 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 ...
0 votes
1 answer
309 views

Biplots in R vs in SAS, does the scale parameter differ?

When reading up on biplots in a principal component context, I found that in SAS setting c = 0 gives you a GH biplot that represents the vectors correctly.[1] The same applies in STATA.[2] From what I ...
0 votes
0 answers
64 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 ...
2 votes
1 answer
288 views

Time series analysis using Stata: Twitter behaviour

Sorry, I'm quite new at Time series analysis. I'm trying to conduct a study on the Twitter behaviour of Donald Trump and how it affects his popularity rating. I have collected the data on his tweets, ...
0 votes
1 answer
37 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 ...
0 votes
2 answers
535 views

Panel data fixed effects xtset, what is the fe at the end?

So basically I understand that in stata, one should utilise XTSET to declare panel data and then ...
0 votes
0 answers
16 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 ...
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 ...
2 votes
1 answer
1k views

Adding Controls to Staggered Difference in Difference Regressions on Stata

I am running a staggered diff-in-diff model, looking at legalization's effect on various variables. For context, only a percentage of all states have legalized, and the year they legalized differs ...
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 ...
-3 votes
1 answer
1k views

Probit analysis shows no significant variables [closed]

In my probit output all p values are insignificant. I want at least some of my variables to be significant. How I correct it? My variables are: crossbreed, age2, gender, education experience2, ...
0 votes
0 answers
51 views

Regression on non-normal DV + Heteroskedasticity

I have a DV scored from 1 to 3 from a questionnaire: respondents were given an integer score according to their responses. I need to compare the mean scores between two groups using a regression (...
0 votes
1 answer
132 views

predict conditional mean after truncated negative binomial regression

I was using tnbreg command and wanted to predict conditional mean. As suggested by Stata for post-estimation after tnbreg code, ...
0 votes
1 answer
2k views

average marginal effect AME vs. average partial effect APE

Say I have a binary logistic regression model: model1 : logit = b0 + b1 *age + b2 *gender_f + b3 *race_f with age being continuous and race_f and gender_f being two-level factors. The ...
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 ...
4 votes
1 answer
4k views

How to run chi-squared test on imputed data

I have a survey data set with missing values and I generated 10 multiple imputations in which the missing values were imputed. There are several categorical variables in the data sets and I'd like to ...
0 votes
0 answers
100 views

How to regress for common trend assumption

I have a database of applicants for a grant and their applications for each year. I want to know the effect of the grant on nr of publications. But first I want to perform a common trend analysis. I ...
0 votes
1 answer
526 views

Calculating Mediation Indirect Effects using GSEM in Stata or R for Count (Discrete) Mediators

Estimating the following model in Stata helped me get the direct effects. This is a set of three models, a beta regression with the final outcome as the dependent variable, and two mediating negative ...
0 votes
0 answers
17 views

Confidence Level for mean comparison among control and treatment group

I collected data where two players interacted with two choices each, where a 2x2 table resulted when representing the game in strategic form. The 4 outcomes are (A, A) ; (A, B) ; (B, A) ; (B, B). My ...
1 vote
0 answers
31 views

Which statistical analysis to use? Stata

So I've got this database that had people rank how much they like very light red, light red, red, dark red and very dark red cars (scale 0-10). My professor says that because it is an 11-point ...
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 ...
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 ...
0 votes
0 answers
23 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
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 ...
5 votes
2 answers
3k views

Implausibly small standard error

I have data of operation success of many doctors. I estimated a regression using Stata with fixed effects on the individual doctors. I first ran the regression using robust option. The resulted t ...
4 votes
2 answers
1k views

Must data be time-series to contain structural breaks?

I have a simple linear regression model and am trying to locate structural breaks in the relationship between the two variables. The data are cross-sectional, not time-series. I've been using Wald ...
0 votes
1 answer
279 views

Two-sample t-test between coefficient from regression on two different samples

I am trying to perform a two sample t-test on the regression coefficients for event dummies between two portfolio's (portfolio 1: Top portfolio and portfolio 2: Bad portfolio) The Do file I wrote for ...
0 votes
0 answers
29 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
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 "...
2 votes
0 answers
583 views

Utilizing ipfraking to apply post-stratification weights for a Community Based Survey in Stata

I am a community data analyst for a small non-profit in South Florida. We are cleaning and preparing a local community survey for analysis and need to apply post-stratification weights to the survey ...
2 votes
1 answer
489 views

What test shall I use to validate the use of a certain score to predict my outcome in a survival analysis?

I validate usage of a clinical cardiovascular score to predict the risk of dementia using data from a longitudinal study. Therefore, my outcome is binary (dementia yes or not) and the independent ...
0 votes
1 answer
766 views

How to interpret hazard ratios in Cox model in Stata?

I am estimating the survival of trade relationships from South Africa to various importing countries. These are the hazard ratios using robust standard errors. I just want to know how to interpret the ...
0 votes
1 answer
490 views

IVREGRESS 2SLS VS IVPROBIT

Suppose we have binary dependent and independent variables (and acbinary Instrumental variable). in Stata which command gives better estimates either ivregress 2sls or ivrprobit? I am not estimating ...
0 votes
1 answer
3k views

Stata: Interaction effects between one endogenous regressor and two exogenous regressors

I am new to using xtivreg2 - and have a question. Sorry if this has been addressed before. Here goes. My question is on 2SLS regression with panel data. I am interested in estimating an interaction ...
5 votes
1 answer
3k views

Multiple weights in multilevel models

I am currently working on a random intercept multilevel model using the European Social Survey round 6 dataset. It is a 2-level model with individuals (level 1) nested within countries (level 2). To ...
1 vote
1 answer
456 views

Statistical Test for one-sample, multiple choice option from a survey

I have conducted a survey where 410 people were given 14 brands. Of those 14, they were asked, "Which brand do you consider to be the "#1 Trust Brand for Protection". Respondents could ...
1 vote
1 answer
1k views

Bivariate probit versus 2SLS, contradictory results (sign)

I am currently facing puzzle and I hope some of you will be able to provide me some insights. I have this model: y: binary variable, x1: binary variable (endogenous), z: binary instrument, x2: ...
0 votes
1 answer
759 views

Why Multivariate L1 Distance from Coarsened Exact Matching (CEM) is high compared to Univariate Imbalance for each matching covariate?

I was looking at a paper link here by Blackwell et al. (2010) on CEM in Stata. In one example using an example data set, the authors ran CEM using the matching covariates such as age, education, black,...

1
2 3 4 5
31