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
votes
0answers
10 views

Creating a dummy variable from a continuous variable [closed]

I have a data on education attainment, coded as WE. It is a continuous variable with minimum education of 5 and maximum education of 17 years. I created a dummy variables as following: edu_matric = (...
0
votes
1answer
15 views

Cross Classified Panel Data Model Using Stata

I'm trying to run a cross classified model using panel data and was hoping to get some help to verify if I'm on the right track (and get advice on my stata code). My data looks at how student ...
0
votes
0answers
9 views

How Can I Interpretation in loglinear regressions with coefficients greater than 1

I run a loglinear regression and got dummy variable coefficient for education level bigger than one. It's also significant and my depend variable's log wage. How would I go about to interpret the 2.21?...
0
votes
1answer
21 views

Stata replacing missing values as well when using operators [closed]

I have a data set in which several observations have missing values, denoted by . (system missing). For the observations that actually do have values, I want to ...
1
vote
0answers
14 views

Testing for parallel trends in panel data/diff-in-diff with only 4 time periods

I am trying to test for common trends on Stata using coefplot, with 4 dummies for each time period (where they equal 1 at time t and if the individual is in the treatment group). However, clearly ...
2
votes
1answer
29 views

Run OLS with multicollinearity

I apologize for my naive question. In this famous experiment they collected responses in 4 different groups: Control (no rewards provided) Gift reward (10 pieces of candy or 50 pieces of candy) ...
1
vote
1answer
33 views

Histograms: display a y-axis with a break in the range of values

I am plotting a histogram showing me the repartition of values of the variable dist_enrolled on a population. This variable takes very small values for 98% of students and can be very high for the ...
0
votes
0answers
10 views

p-value in restricted cubic splines regression

How to calculate the p for overall and p for nonlinearity for a RCS model in STATA? Like what they did in this picture.
3
votes
1answer
39 views

Mixed-effects modelling of mortality rates

I have a dataset with annual observations (1990-2016) on neonatal mortality rates (dependent variable) for countries 1, 2, 3, 4, 5, and 6. The independent variables are indicators 1, 2, 3, 4, and 5. ...
0
votes
0answers
35 views

Mixed-effects linear regression in Stata

I have a dataset with annual observations (1990-2016) on neonatal mortality rates (dependent variable) for countries 1, 2, 3, 4, 5, and 6. The independent variables are indicators 1, 2, 3, 4, and 5. ...
2
votes
0answers
29 views

Linear Probability Model Instead of Logit in Fixed Effects Regression

In our panel data analysis we estimated a fixed effects linear probability model (LPM) instead of a fixed effects logit regression because our sample size was quite small (600 individuals) and the ...
1
vote
2answers
16 views

Appropriate Model to predict food preference with high number of dependent variables

I am trying to build a model that delivers a prediction for which food a person may like based on information the person has entered into the system beforehand, e.g. they input that they like (beef, ...
1
vote
0answers
12 views

Heckman for hedonic regressions

using EHCP micro data, I am trying to predict the rent that households in social housing would have paid on the market. For this purpose, I have a variable describing the tenant_status: 0 if no ...
2
votes
1answer
31 views

Likert Analysis - Dunn's Test (Stata)

Similar to previous questions but I'm still a little confused as to whether I've followed the right process/understood the results correctly. For a research project I'm conducting I used Likert ...
1
vote
2answers
79 views

How to correctly account for country effects in logistic regression?

I use a database with entries at firm-level in 12 countries in 2008. I try to estimate innovation (0/1) based on few firm-level variables. I also want to see if / how much innovation is also due to ...
1
vote
1answer
20 views

Which model should I use?

I'm very much a Stata and linear regression newbie. I am running a linear regression with Bitcoin price as the dependent variable and using independent variables such as the S&P500, SSE, and FTSE ...
1
vote
0answers
12 views

Handling large percentage of zero-valued observations in a continuous dependent variable in a panel dataset

I am writing a paper using a panel dataset in which my depepent variable is continuous has an large percentage amount of zero values observations. Those zero values are real zeros, I mean they are not ...
0
votes
0answers
6 views

Should I use a Heckman Selection Model when extracting a subset of my data for analysis?

I am new to heckman selection, and am having trouble applying it to my case. In fact, it's possible I should not be using a selection model at all, so I wanted to check first. My dependent variable ...
1
vote
1answer
36 views

Stata multinomial logit IIA assumption violated or not?

My dependent variable is Choice, 0 for non-issuers, 1 for seasoned equity issuers, 2 for convertible issuers and 3 for bond issuers. I use the following command to ...
0
votes
0answers
17 views

Difference in differences with multiple treatment groups that all receive treatment at the same time

I have panel data measuring an outcome at the state-day level. I have data on 35 states. 10 of the states received treatment all on the same day. I want to setup a difference-in-difference design to ...
0
votes
0answers
18 views

Imputation in Time Series with Varying Start Dates

I have a set of time series variables, most of which start at the same time as my dependent variable, but some of which are missing at the beginning of the series (at start at varying dates). I want ...
0
votes
0answers
28 views

Interpretation of higher coefficient for group with smaller mean

I am running a fixed effects poisson model with robust standard errors in STATA (xtpqml). The model I run it on has my count data as dependent variable and then as my independent variable I have a ...
0
votes
0answers
9 views

Which model is best using the hettest for heteroscedasticity test?

I have calculated hettest using STATA and i have found two models have no Heteroscedasticity problem. but i can not identify which one is the best model for my data. can you please help me out? I ...
0
votes
0answers
11 views

Country and year fixed effects models i.Year vs

My aim is to estimate a model with country and year fixed effects. I both have a variable with the years in long format, and a series of dummy variables for each year. My concern arises because I ...
3
votes
2answers
85 views

demeaning or differentiation in fixed-effect equation

I have panel data (with short time-dimension $T>2$) and I consider a simple model of the form: $$y_{i,t} = x_{i,t} \beta + c_i + \epsilon_{i,t}$$ where $E(x_{i,s}\epsilon_{i,t})=0$ and $\epsilon_{i,...
0
votes
0answers
31 views

Predicting hazard in an AFT Weibull model

I have fitted a Weibull Accelerated Failure Time model and my question is how to obtain the hazard. For example in Stata, after fitting a model with streg, typing predict newvar, hazard obtains the ...
0
votes
0answers
12 views

Moderation in ordered regression

For my thesis, I have to do some regressions in STATA. I am not very good with STATA at the moment, so I would like to check if some things are correct with you. Help is greatly appreciated. My ...
0
votes
0answers
48 views

dynamic GMM (xtabond2) with interactions

I am trying to estimate a model using first difference GMM estimator with the xtabond2 command and I was trying to understand whether my logic was consistent. I ...
0
votes
0answers
12 views

Covariate flips association in multiple regression?

I have a model in which if I run the dependent (binary) variable with an independent (binary) variable, I get a strong positive correlation (OR around 4). However in the multiple regression model with ...
0
votes
0answers
4 views

How to fit a continuous latent variable to a logit model and have its coefficient estimated using Stata gsem?

I am working on a data from which I assume there exists a latent variable that is (1) continuous in scale and (2) is a function of various covariates. I then want to incorporate this latent continuous ...
0
votes
0answers
12 views

Two Sample Mean Comparison Test Vs Two Group Mean Comparison Test

Recently while using stata I came across Two Sample Mean Comparison Test Vs Two Group Mean Comparison Test, I am wondering what's the difference between the two where and in what scenarios these tests ...
0
votes
0answers
14 views

Graphing Grouped Logit With Fixed Effects - Predictions Outside Bounds

I have a dataset of aggregated binomial data: have a list of candidates and the proportion of their ads that have certain characteristics. Since I calculated it myself, I also have the total number of ...
0
votes
0answers
22 views

Survival analysis for right-truncated data with time-dependent variables

I would like to fit a parametric (exponential, log-logistic, Weibull) or semi-parametric (Cox) duration model with time-dependent covariates. My data has one specificity: it is right-truncated (and ...
0
votes
1answer
48 views

Calculating Confidence Interval (STATA code) [closed]

I am having trouble understanding the code that the authors used to calculate the confidence intervals for the whiskers shown in the diagram below. The code that the authors used to calculate the ...
0
votes
0answers
15 views

Grouped Logit vs. Non-Linear Least Squares vs. Negative Binomial w/ Exposure?

I'm currently working on a project looking at the effect of competition on the type of appeals candidates make in their campaign advertisements. My dataset consists of a list of candidates, the ...
1
vote
1answer
35 views

Is difference-in-differences analysis with time as dummy better than 'ordinary' y=after, x = before regression?

I am a natural scientist dipping my toes into the more social, economical side of things where instead of GitHub and R, Stata is the go-to tool and almost everything is 'panel' data. Similar analyses ...
0
votes
1answer
102 views

Time varying covariates in longitudinal mixed effect models

I am looking for some help with my analysis of longitudinal data with time-varying covariates. I am planning to use R and the lme4 package. However, I am happy to use Stata also. I am interested in ...
2
votes
1answer
87 views

Regression diagnostics for ordered logistic regression

I am doing a regression with an ordinal dependent variable (answers ranging from very good to very bad) for the first time. The model itself seems to be working fine. I have no idea however which ...
0
votes
1answer
56 views

How to run svy: regress in R or get R-squared in R for complex survey data

I am trying to get r-squared, or explained variation, in a complex survey data using a linear regression (OLS). In Stata, this can be done by using svy: regress. In R, however, when I use 'survey' ...
0
votes
1answer
25 views

Flexible Regression Specification for Panel Data in Stata [closed]

I am currently looking to estimate a somewhat complex regression model to analyze the market value of banks. The model can be found in Calomiris and Nissim (2007), and is pictured below. The model is ...
0
votes
0answers
3 views

LSTARDL Model fitting

I would like to fit a LSTARDL Model with R, Stata or Rats but everything i saw was on LSTAR Model. My idea firstly was to estimate and ARDL model and then specify the relationship obtained between ...
1
vote
1answer
121 views

Different results from random effects plm (R) and xtreg (Stata)

I'm trying to convert the analysis from an old research paper from Stata to R. However, I ran into a problem that I have been unable to fix. When I compare the coefficients from the two programs, ...
0
votes
0answers
17 views

Multiple Imputation data and predicting residuals

I would like to know what would be the best way to predict the residuals for a regression involving multiple imputations. To be more specific, I am using an income inequality measure as a dependent ...
2
votes
0answers
48 views

nonparametric sample size calculation

I am running into conflicting information regarding a running a sample size calculation for a nonparametric dataset. I will be collected data from a medical procedure that gives pressure readings ...
0
votes
0answers
28 views

Is it necessary to adjust for multiple comparisons (e.g. Bonferroni) when using continuous interaction terms (e.g. age)?

I am interested in analyzing how the effect of a dichotomous variable on a dichotomous outcome changes by age. In reading this how-to article from UCLA's Institute for Digital Research & Education-...
0
votes
1answer
39 views

One variable “ruining” an otherwise interesting model

I'm running a logistic regression model with several variables. I'm picking variables with a p less or equal to 0.2 to include in the multivariate model, and a lot of variables have really low p ...
2
votes
1answer
59 views

Standard error of the intercept in Frisch-Waugh theorem (de-meaned regression)

I am applying in Frisch-Waugh Theorem to partial out a set of fixed effects D and get the OLS estimates and standard errors of the remaining regressors ...
0
votes
0answers
23 views

Interaction between Ordinal and Dummy Variable?

Hello ladies and gentlemen, I am interested whether an existing effect is altered by the levels of another effect. As far as I know, including interaction variables is an appropriate way to explore ...
0
votes
0answers
52 views

Weibull Model in Stata vs R

I am currently trying to replicate a study on war duration, which used Stata's streg function to estimate a parametric Weibull model. The stata code reads: ...
0
votes
0answers
20 views

panel data regression or OLS regression?

I have a panel data on cities across 40 states for two years. My independent variable is a time variable, because I want to see policy outcomes between two time periods. In this case, should I do ...