Stata is a proprietary cross-platform general-purpose statistical software package.

learn more… | top users | synonyms

-1
votes
0answers
10 views

calculate mean for groups [migrated]

I'm doing a research about SATs scores by cities. I have every city coded. Is there any way to ask stata to calculate the mean for each city without having to type the city-code? Not having to write: ...
0
votes
0answers
10 views

Stata: Creating Date Dummies from Start and End Date [migrated]

I would like to create from some start and end dates dummy variables which take value 1 if in the range. For example, from ...
1
vote
1answer
30 views

Comparing coefficients of two variables: one is significant, the other is not significant

I'm trying to test whether the coefficient for one independent variable ($X_1$) is larger than coefficient for another variable ($X_2$) in predicting the dependent variable ($Y$). For example, my ...
0
votes
1answer
37 views

Poisson Regression Residuals

I'm modeling the number of doctor visits (a count variable) on factors such as income, chronic condition, insurance, etc. I use the canned Stata command ...
1
vote
0answers
14 views

Mann-Kendall test STATA

I am new in this forum. I am beginning to work with time series, I have a daily (25,000+ observations) temperature dataset (01/01/1946 - 07/01/2014) I want to test for the following: Trends: So ...
0
votes
0answers
13 views

How to deal with repeated indicator-week combinations in panel data?

I have a panel dataset that contains information on households and their purchases in specific weeks and even minutes of a week. For example, a household would purchase different brands of beer and ...
1
vote
1answer
21 views

Reducing the number of interaction terms in a diff-in-diff model?

Is there a way to reduce the number of interaction terms in a diff-in-diff model to make the results easier to interpret/present? Background: I'm trying to run the following diff-in-diff regression: ...
2
votes
1answer
69 views

Difference between random effect and random intercept model

I am looking at clustered data and because I was trained in economics I tend to look at fixed effects and random effects as solutions. An alternative would clearly be multi-level modelling. However, ...
0
votes
0answers
28 views

Getting full results of regression with bootstrap

I'm doing regression analysis and want to use bootstrap. Since "simpleboot" package in R doesn't return p-value, I've decided to bootstrap manually instead of using package. However, the result I got ...
1
vote
1answer
35 views

Accounting for Violation of Parallel Trend Assumption in Diff-in-Diff with Propensity-Score Matching

Objective: I want to test the effect of a regulatory change using a classical pre-post/treatment-control DiD design (Y = POST + TREAT + POSTxTREAT + e). Problem: Treatment & control obs. are from ...
0
votes
0answers
23 views

Interaction in a repeated measures logistic regression

I want to test for the effect of interaction between two variables using a repeated measures logistic regression but I don't know how. I am using Stata and the following lines: ...
2
votes
1answer
62 views

Testing for the significance of the difference-in-differences of adj. R²

Is there a way to test for the significance of the difference-in-differences in adj. R²s in Stata? Let's say I have four subgroups: pre-treatment, pre-control, post-treatment, post-control and I want ...
4
votes
1answer
167 views

Why doesn't regression results change after bootstrap?

I learned bootstrap is used to treat non-normality of residual and it basically does resampling. I did bootstrapping on Stata and compared the result with normal regression. ...
0
votes
0answers
20 views

Stata ANOVA Interaction term differences

The following two statements produce different results. ...
2
votes
1answer
48 views

Basic 2SLS IV Questions in Stata

(1) If I believe my instrument is exogenous conditional upon a few exogenous variables, do I include them only in the first stage? I.e. would the command be: ...
1
vote
1answer
51 views

Limited dependent variable → ordered probit model with Stata

I have a dependent variable, credit rating, and it is a limited dependent variable. Independent variables are profitability, firm size, stock return, etc. I was advised to use Stata and run ...
3
votes
1answer
42 views

Interpreting fixed effects coefficients with categorical independent variables

I am trying to find out if change in marital status have effect on person's health. I am using 2 data points panel data. My question is, how to interpret fixed coefficients if independent variable ...
1
vote
0answers
25 views

difference in pre and post populations

I'm looking at the difference in demographics of people with a disease pre-outbreak and post-outbreak (e.g. age, sex, location etc). I know how to use $t$ tests and $\chi^{2}$-tests for comparison ...
2
votes
1answer
46 views

Is it possible to use the Breusch-Pagan Lagrange multiplier test (xttest0) in Stata for unbalanced data?

Is it possible to use xttest0 in Stata with unbalanced panel data? I want to test whether the I should use pooled OLS or random effects estimation. What does this test actually do?
0
votes
0answers
4 views

Creating an Edge List in Stata [migrated]

I have a network dataset in Stata that I need to create an edge list for. I know how to create an edge list in Python or in any scripting language, but I'm on a restricted account that doesn't have ...
5
votes
1answer
49 views

Zero inflated negative binomial with selection

I am looking for a Stata (or R/Matlab if there's no Stata) implementation of the model described by Greene (1994) (http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1293115). It is essentially a ...
1
vote
0answers
45 views

Is it possible to fit a Graded Response Model in Stata?

I've been reading about Item Response Theory during the past few weeks and I'd like to use it to examine how my scales are functioning. The response categories are ordinal. If I understood well, the ...
0
votes
0answers
24 views

Best non-parametric test for continuous dependent variable and binary independent variables

I am struggling with the choice of which test would be appropriate for my data. My sample size is very small (n=16), thus I have chosen to perform a non-parametric test in order to prove my ...
2
votes
2answers
40 views

How to find significant difference in a group/ ANOVA

Am I right to say that the results from the a repeated measures ANOVA does not tell you where a difference is in the group (if any)? So a post hoc test needs to be carried out? I'm using Stata to ...
0
votes
1answer
38 views

Residual specification for xtmixed

Suppose a random intercept model is to be fitted, like: $$y_{ij}=\beta_0 + \beta_1x_{1ij} + \beta_2x_{2ij} + \beta_3x_{3ij}+ u_{0j} + \epsilon_{ij}$$ where $x_{1ij}$ and $x_{2ij}$ are continuous ...
0
votes
1answer
33 views

Ignore assumptions and still go ahead with a parametric test?

I have data which is not normally distrubuted (histogram doesnt show a bellshape data and normal plot shows a bit of a zig zag data going through line of best fit) but standard deviations are of ...
0
votes
0answers
25 views

repeated measures ANOVA - non-experimental data

For every year, for eight years, I have a set of projects (n=332). The number of projects that exist in each year varies (for example, some years there are 10 projects others there are 60). In each ...
1
vote
1answer
40 views

y-axis length for LOWESS curve in Stata

I have a problem considering the length of the y-axis in a LOWESS plot in Stata. The y variable ranges from 0 to 50. I would like to run the LOWESS on all the data but only display the graph for the ...
2
votes
1answer
38 views

Which test to use to measure if target has been met?

The photo below is an example of the result i would like to obtain using the test which i cannot find in the article itself, i was hoping maybe any of you would know. I have tried to carry out chi ...
1
vote
0answers
29 views

Wilcoxon matched pair signed rank test after using CEM

Can I run a Wilcoxon matched pair signed rank test after using Coarsened Exact Matching to match data? If yes, please guide me through the process. I use STATA.
2
votes
1answer
99 views

Fixed Effects Gravity Model for forecasting..with time constant variables Stata

I have a large panel data set of global trade flows and I would like to create a model for forecasting between two specific country pairs. I am just having trouble figuring out how to go about it in ...
1
vote
0answers
28 views

Stata's -margins- shows negative predicting value for count model

I am modeling "Innovation" counts over "HHI" and "squared HHI" with fixed effect poisson model. (My sample is unbalanced, small & wide one.) I am aware of that I can use Stata's -margins- command ...
1
vote
1answer
48 views

Comparing proportions in two samples

(x-posted to Statalist) I have two (probably) independent samples taken from the same population under two different surveys conducted a few years apart. I'd like to check whether the frequencies for ...
0
votes
2answers
52 views

Pseudo R equal to one in logistic regression

In Stata, how can pseudo R equal one? This is accompanied by blank spaces in standard error and other indicators. The analysis is binary logistic regression. What can cause this? ...
3
votes
1answer
55 views

Specification of panel data

I am trying to find out the best specification for my dataset. I am trying to probe the effectiveness of the special economic zones in Poland in the meaning of growth of the economy in three ...
2
votes
2answers
92 views

Large coefficients and std. errors

I run a fixed effect model with Stata and because my dependent variable is a large number (max of 12 million and min of - 4 million), I got large coefficients for ...
0
votes
0answers
36 views

Fixed effects analysis in Stata

I have a large data set on which I need to run a fixed effect regression. The two variables that I want to control for: year (2001–2008) and industries (20 types). But I apparently need to set the ...
0
votes
0answers
11 views

Analysis of predictors of change (outcome measured at two time points)

I have data where a Normally-distributed outcome was collected at two time points. Covariates were also collected at both time points. Some of the covariates (e.g. sex) didn't change between the two ...
0
votes
0answers
20 views

Contradictory xtunitroot results

I am using unit root tests in Stata's xtunitroot command. The data are annual wage replacement rates for unemployment benefits in each of the 50 states for 1977 to 2006. (They vary noticably from ...
5
votes
2answers
207 views

Conditional logit model and price elasticities

I have a dataset with 20 products and whether someone bought them, their price and other attributes. I am trying to find the own and cross-price elasticities of these 20 goods. I have used a ...
1
vote
0answers
38 views

SUR estimation and Heckman selection model with panel data on Stata?

I'm working with unbalanced panel data using time and firms as IDs and would like to find out how to test for correlation between two panel equations that may be seemingly unrelated. The second ...
3
votes
1answer
102 views

Plotting results with many features

I need an advice for plotting my results. I got different classification results by including different features and different k values. So, I got different results for each of them: My features: ...
0
votes
0answers
33 views

Trouble Interpreting Fixed Effects and What Features Are Fixed

I have a large panel dataset. It follows a number of schools over 10 years. It is essentially set up as follows: Year School VariableOfInterest ExplanatoryVariable InstrumentForExplanatoryVariable I ...
0
votes
0answers
33 views

Fixed effect model is not significant without year dummies

My fixed effect model is insignificant when I don't include the year dummies $$\text{Prob $>$ F} = 0.7769$$ When I try other regressions the model is fine, for example Driscoll & Kraay ...
3
votes
2answers
101 views

How to approach missing data…ignore or not to ignore?

What would be the best option when you come across missing data. Do you exclude that person completely from the data analysis or not. If not then how do you go about it? i have data on two groups at ...
1
vote
1answer
52 views

Should I analyze variables separately or together?

I have one categorical variable (on a diet: yes or no) and two numerical variables (patients heart rate and ...
4
votes
2answers
137 views

Implausibly small standard error

I have data of operation success of many doctors. I estimated a regression using Stata with fix effects on the individual doctors. I first ran the regression using robust option. The resulted t value ...
0
votes
1answer
153 views

How can I test heteroskedasticity in a Tobit model with Stata 12?

I want to test heteroskedasticity in a Tobit model with Stata 12. But I don't know how to do that. When I used an OLS model, I tested heteroskedasticity and autocorrelation, and didn't find much, but ...
1
vote
0answers
47 views

Selection correction variable (non-randomly selected sample / bias) and Cox regression

I found an approach to calculate a selection correction variable for a Cox regression (Lee 1983. Generalized econometric models with selectivity. Econometrica 51: 507–512.): $$ λ = \phi \frac{ ...
0
votes
0answers
73 views

Can I use outreg (or outreg2) in Stata to output first stage least squares?

I'm using Stata to analyze my panel data. I run several fixed effects regression with instrument variables and I'd like to output the first stage and second stage least squares to Excel and Latex ...