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

learn more… | top users | synonyms

0
votes
0answers
16 views

Dividing Data Into Subgroups and Regressing them with Restrictions using Stata [on hold]

I have five variables: TC, Q, PL, PF and PK. There are 145 observations arranged by the level of output, Q. My task requires me to do generate the following variables: ...
0
votes
1answer
44 views

Preparing survey data for analysis

I am preparing a complex survey data for analysis. The survey involved a two-stage stratified cluster sampling. In the first stage, I have 7 strata and 4 sampling units and in the second stage I have ...
1
vote
2answers
57 views

How does the inclusion of an intercept change the variability of the residual?

I want to use the variability of the residual as a measure M and then test whether M is higher or lower after some event. However, I estimate separate regression before and after the event to obtain ...
0
votes
0answers
2 views

How do I store regression results from loops in Stata? [migrated]

I have built a model which basically does the following: run regressions on single time period print results The regressions output two numbers that I am ...
0
votes
0answers
9 views

Stata - Multiple rotated plots on graph (including distributions on sides of axes) [migrated]

I would like to produce a single graph containing both: (1) a scatter plot (2) either histograms or kernel density functions of the Y and X variables to the left of the Y axis and below the X axis. I ...
0
votes
0answers
36 views

Countif in Excel with multiple criteria [migrated]

I have an index for law and order conditions in many countries over several years. For each country I want to find out how many countries are ahead and how many countries are behind for a given year. ...
0
votes
0answers
35 views

Autoregressive distributed lag models ADL(p,q): seeking “how to” preferably in Matlab (Stata/R/Python/C# etc)

Could anyone provide me the details of how to determine the lag order of the distributed lags for an $\text{ADL}(p,q)$ model in Matlab or another statistical package (and very much preferably in ...
1
vote
1answer
67 views

Marginal effect calculation in Stata

My estimated dynamic GMM model results are as follows. $$Y = -0.009 + 0.009PF + 0.015PS - 0.001(PF\times PS)$$ I want to calculate the marginal effect of $PF$ at $PS$ (min, mean, max), which I can ...
0
votes
1answer
63 views

Stata error: “panels are not nested within clusters”

I have an unbalanced panel data set with more than 400,000 observations over 20 years. My panel variable is a person id and my time series variable is the year. The persons are from all over Germany ...
0
votes
1answer
52 views

How to obtain Item Information Curves for the Partial Credit Model?

I have estimated a Partial Credit Model in Stata following Zheng, X. and Rabe-Hesketh, S. (2007) "Estimating parameters of dichotomous and ordinal item response models using gllamm". I'd like to ...
0
votes
0answers
7 views

Table formatting for esttab (STATA) [migrated]

I'm running 12 different regression models -- 3 different specifications for 4 different outcomes variables. I'm interested in only one coefficient in each model. I would like esttab to spit out a ...
0
votes
0answers
10 views

How to compare a measure reflected by a regression residual in a pre-post design?

Maybe a simple question, but my head is spinning: I want to see if X increased after a certain treatment in a pre-post study. Unfortunately, I have only K which is a noisy measure of X. To "clean" K ...
0
votes
0answers
18 views

Significance of variance components in Stata output

This might be trivial, but I'm used to HLM7 software output and now I'm switching to Stata (xtmixed). To give an example imagine I have students (level1) nested ...
0
votes
1answer
21 views

Adding 2nd level variable into Multi-level Modelling in Stata

I'm used to HLM 7 software and now I'd like to switch to Stata, for multilevel modelling (xtmixed). To give an example imagine I have students(level1) nested within schools (level2). In HLM I can ...
1
vote
1answer
27 views

Which regression analysis should I use for ranked dependent variables and proportional independent variables?

I am analysing the effect of deprivation on breastfeeding and am wondering which type of regression analysis I should use. It is area level data. Deprivation data is available as a score from 0 - ...
0
votes
0answers
21 views

Is there a statistical technique to perform this comparison? How could I do this on Stata?

I've been busy on a work where I have to compare two financial econometrics models on the determinants of financial leverage (panel data). These have only few control variables and the dependent ...
0
votes
1answer
79 views

Compare coefficients from two separate panel regressions in Stata

I am trying to compare the coefficients of two panel data regressions with the same dependent variable. What I am aiming at is the following: ...
2
votes
0answers
30 views

How to apply hurdle models to panel data (using Stata)?

Is it possible to apply hurdle models (like the Craggit, probit and truncated models) to panel data, preferably with fixed effects to control for unobserved heterogeneity? In Stata, the user-written ...
-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
46 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 ...
1
vote
1answer
53 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
31 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
16 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
33 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
84 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, ...
1
vote
1answer
49 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
28 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
70 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
204 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
1answer
35 views

Stata ANOVA Interaction term differences

The following two statements produce different results. ...
2
votes
1answer
55 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
87 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
69 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
28 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
100 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?
5
votes
1answer
60 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
58 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
37 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
51 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
46 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
36 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
28 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
46 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
40 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
37 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
166 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
36 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
58 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
53 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? ...