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
3 views

Convergence not achieved in Vincenty formula for Moran 1 test [closed]

I am working with a dataset with 170 Indian districts and district level data on Indigo cultivation. I wish to check for spatial autocorrelation. I am using the moransi command on Stata. However, it ...
0
votes
1answer
16 views

Regression with/without interaction vis a vis CEF

I am interested in improving my understanding of regression and CEF. In particular, I bring two related questions: 1) How to interpret a relationship with two dummy variables without interaction; and ...
0
votes
1answer
11 views

When/why are average marginal effects (AME) equal to marginal effect at means (MEM)?

I wonder why my two versions of marginal effects (AME and MEM) yield identical results: ...
-1
votes
0answers
14 views

Is there any R package similar to 'ivreg2' in Stata? [closed]

The ivreg2 is helpful for instrumental variables estimations in stata when there is a dynamic panel data model. But is there a similar R package as well to do this? Also for dynamic data model.
2
votes
1answer
22 views

What does stata's laglimit mean?

I just saw an explanation to xtabond2 here ...
0
votes
0answers
14 views

Points of mass in running variable in RD design

I am trying to run a fuzzy RD design using Stata, where the running variable is municipal population. However, when I try to compute the optimal bandwidth using ...
0
votes
1answer
20 views

how to interpret the marginal effect on y from an etregess model of ln(y)

Using stata (with weighted survey design) I ran the following, where logwage is the log of wage. The log was taken because wage was not normally distributed. There is also information about the ...
1
vote
1answer
28 views

Interpreting log linear margins with endogenous treatment effects

I'm having trouble in understanding the predictive margins after a log linear regression with endogenous treatment effects. Using stata (with weighted survey design) I ran the following, where logwage ...
0
votes
1answer
20 views

Interpreting linear regression with endogenous treatment effects

Using stata (with weighted survey design) I ran the following, where logwage is the log of wage. The log was taken because wage was not normally distributed. There is also information about the ...
0
votes
0answers
3 views

Fixing persistent autocorrelation with autoregressive term in addition to using Prais Winsten

I was wondering is this a valid approach to fix autocorrelation. If we generate a lagged dependent variable then proceed to use Prais command on this transformed model with the autoregressive term: ...
0
votes
0answers
7 views

How to incorporate Week, Weekday, Holiday, and Hour Fixed Effects in Regression for Stata

thank you for taking the time to read and help! I currently have data from 2017-2020 July and with the variables date, hour (1-24), and amount in dollars. I want to incorporate Week, Weekday, Holiday, ...
0
votes
0answers
17 views

How to perform mixed logit model with heterogeneity in mean and variance in software?

Currently I am learning this model with some papers published in journals, then not in detail. It is named as random parameter logit model with heterogeneity in mean and variance (maybe another name ...
0
votes
0answers
20 views

Stcomlist- difference between cif curve and table values (STATA)

I am having issues with the stcomlist and stcurve commands in STATA. Here the code I am using to get the tables: ...
2
votes
1answer
27 views

Looking for R's way of doing Stata's svy tabulate with “tab” argument [closed]

Stata's svy command allows to get standard error estimates from two way contingency tables and the tab(varname) option makes it ...
2
votes
0answers
25 views

How do I estimate time specific unobservable variables with panel data?

I have a problem that deals with human capital. I assume that wages $W_{it}$ are determined by the level of human capital $K_{it}$ and the market clearing rental rate that applies to all workers $R_{t}...
0
votes
1answer
14 views

Does wealth index created in stata (command: pca and predict) considers all the components whoese eigen value more than 1 or just first component?

I am trying to calculate the wealth index of a rural community of Nepal. For this, I used 10 household assets variables after conducting a descriptive analysis. I used the principal component analysis....
0
votes
1answer
27 views

Creating a categorical variable for combinations of two variables in Stata? [closed]

I have two variables, X and Y. I want to create a categorical variable for pairs of X and Y, that takes the same value for the same combinations of numbers in X and Y; for example the same value for (...
2
votes
1answer
35 views

When endogenous variable is non-normally distributed

I am trying to fit an IV probit model with my dependent variable being binary. However, my endogenous variable is a "ratio" variable, which is not normally distributed, thereby preventing me ...
0
votes
1answer
24 views

Stata Logit Model: Dummy Interaction With/Without Dropping Intercept vs Sub-Group Odds Ratio

Regarding data, there are three binary variables: trt(0,1), fail(0,1), and female(0,1). For sub-group analysis (male vs. female), I am running typical 2x2 treatment vs. failure tables separately for ...
0
votes
1answer
31 views

Elixhauser comorbidity index for stata? [closed]

There is known version of the Elixhauser comorbidity index for R, but has it been made available in Stata?
0
votes
1answer
23 views

Fixed effects in a cross-sectional data set

I am conducting a research with a cross sectional data set (1 year, multiple countries). Now i am researching the likelihood of supportive leadership and firmsize. Now firm size is a catogorical ...
0
votes
0answers
12 views

Elasticity estimates with Tobit using margins command in State 12

I am running a tobit regression to model education expenditures (zero for some households) and tried using margins, eydx(*) to obtain the elasticity estimates, but ...
0
votes
1answer
35 views

What I do with the results extracted from lasso?

Summarize the problem I have a dataset with panel data and I am trying to make variable selection. I have tried lasso technique. Lasso proposed me a list of variables that could be included in the ...
2
votes
0answers
30 views

Exploratory factor analysis in a panel setting

We would like to apply an exploratory factor analysis (EFA) in a panel setting, i.e. where variables are observed within an individual over time. Principally, two ways of doing this come into mind: a. ...
5
votes
2answers
69 views

At what point in analysis do you perform imputation for missing variables?

There is a dataset with 30 variables and over 5 million observations. We plan to use a subsample of the data for analysis. Around .02 - 2.5% of EACH variable are missing. I plan imputation in Stata ...
1
vote
1answer
36 views

Specifying the singleunit() option with svyset in Stata

I'm currently working with data related to education that was collected in different geographic regions. Included with the data are weights and strata, meaning Stata ...
1
vote
0answers
41 views

Country-year fixed effects when the instrument varies only by country year

Background I have a pooled cross section with observations at the firm level in 10 countries over two time periods. I am trying to estimate the following model: $$sales=B_0 + B_1taxrate + ...
0
votes
1answer
26 views

Test for weak instruments in Stata when using VCE robust [closed]

does anyone know how I can test for weak instruments (one instrument, just identified model) after 2SLS regression in Stata when using robust standard errors (VCE robust)?
2
votes
0answers
23 views

Regression Discontinuity by adding a vector of dummy variables..?

I'm having trouble understanding the following model coded with Stata. ...
1
vote
0answers
21 views

Can you cross validate a regression model using supervised learning?

Our team created a regression model based on a select data size/parameter and achieved a good C-statistic (area under ROC curve). We faced a few difficulties with submission for publication, so I ...
0
votes
0answers
36 views

Performing a Mediation Analysis for Fixed Effects Model using bootstrap

I'd like to perform a mediation analysis using a fixed effects regression model. My understanding is, that I 1) calculate the base model without the moderator 2) calculate a FE regression of the IVs ...
2
votes
0answers
17 views

Propensity score matching - time variant treatment

I have a question about propensity score matching for a panel data file. The aim of my study is to understand the impact of having the first child on the wage of women. My data goes from 2001 to 2018. ...
1
vote
1answer
32 views

Interpret regression output using a likert scale IV (using STATA)

I want to run a regression with an binary DV and a likert scale ( 1=strongly disagree, 2=disagree, 3=agree, 4=strongly agree) IV. I think the right model to use is a probit regression, or what would ...
2
votes
2answers
82 views

Different results in mixed model between R lme(), lmer() and Stata

I am fitting a multilevel model on pooled country-waves, i.e., I ignore the time framework and use individuals nested in countries. However, I obtain different results fitting the starting simple ...
0
votes
1answer
28 views

Exploratory Factor Analysis in Likert-scale development

I am building a new metric for our organization. We ran a sample survey of 34 questions all on a five-point Likert scale, collected data, and used EFA to identify 10 survey questions that hang ...
0
votes
0answers
25 views

Decision upon whether to Drop or Impute the missing Data

I have panel data having 26 countries and each country has of 22 years data (i.e. 572 Cases or records). There are total 8 attributes (1 dependent and 7 independent ). When i analyzed missing values ...
0
votes
1answer
23 views

Categorical variable as independent variable [closed]

I am using the variable education level as a control variable and this variable consists of 7 education levels (1-7). Now I can't use it as it is converted in the data. My teacher has messaged me that ...
0
votes
3answers
57 views

How to manually calculate standard errors for instrumental variables?

I am working on statistical inference with instrumental variables (IV) following Wooldridge (2016) Introductory Econometrics, Ch. 15. I am using the Card data set (like the book), with wages as ...
0
votes
1answer
46 views

Stepwise regression - what are the steps in STATA?

This question will probably seem very stupid, but hey, econometrics and statistics were never really my strongest features! For my BA, my professor adviced me to perform stepwise regression. My ...
1
vote
1answer
20 views

Using margins after probit estimation to equal probabilities between almost identical individuals

I'm considering a Probit model for the probability that a student will finish the course based on their hours of study, age, sex, origin, how they passed the previous course and labor market situation ...
0
votes
0answers
21 views

Difference in Difference multiple Time Treatment : R or Stata

I have panel data to which I fit a Difference-in-Difference model. Specifically, I regress Bilateral Investment Treaties (BIT) on Bilateral Foreign Direct Investment (FDI). BIT is a dummy variable ...
1
vote
1answer
28 views

How can I test “Pollution causes people move to less polluted cities”?

I want to find an answer for the following question: "Air pollution causes people to move to less polluted cities from 1990 to 1991"? Assume there are four cities: San Diego, Los Angeles, San ...
0
votes
1answer
46 views

Relationship between two randomly-generated variables

Using stata, I generate two random variables and regress them with each other. ...
1
vote
1answer
49 views

Is this Residual-vs-Fitted-Plot showing homoscedasticity or heteroscedasticity?

I have a regression model. I checked it with hettest (test for heteroscedasticity) in Stata and it gave me an insignificant result; thus no heteroscedasticity. But ...
0
votes
2answers
64 views

Differences in differences, fixed effects and standard errors

I have a question on estimating a difference in differences model using Stata. As I understand this, also from other questions, when there are no covariates, estimating the diff in diff using a ...
0
votes
1answer
30 views

Survey design for multilevel models

I am trying to fit a multilevel model with complex survey design data in Stata. However, my model levels do not correspond to my survey design stages. My survey design is based on sal primary ...
0
votes
1answer
27 views

Why do clustered power calculations fail with two clusters?

Would someone be able to provide an intuitive explanation for why a power calculation with two clusters (one per arm) fails? For example, when I run this command in Stata (in both clustersampsi and ...
0
votes
1answer
62 views

Housing discrimination example: How do I go about this problem?

I have been given a dataset containing the following setup and the following data. Two prospective tenants, one black and one white are looking for apartments across various neighbourhoods. The ...
2
votes
1answer
71 views

How to block bootstrap in stata with set of dummy variables as controls

I want to estimate a Multiple multivariate regression of the type $$y_1=a_1+b_1*x+c_1*\text{countrydummies}+e_1 \\ y_2=a_2+b_2*x+c_2*\text{countrydummies}+e_2 \\ ... \\ y_N=a_N+b_N*x+c_N*\text{...
0
votes
0answers
58 views

Average treatment effect , binary outcome and odds ratio

I am struggling with ATE. I have two treatment group in a cohort (binary 0=treatment A; 1=treatment B). I want to know the odds of variable Y (binary 0=no event; 1=event) b/w two treatment groups ...

1
2 3 4 5
26