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

learn more… | top users | synonyms

2
votes
1answer
17 views

3-way interaction Stata

I have a panel data in the following form: <id> <city> <treated> <time> <after> where id identifies the individuals in my panel, ...
0
votes
1answer
35 views

Difference in Difference with multiple period (pre, during, and post treatment)

I was wondering if someone can help me understand how I should formulate my difference in difference regression. Under a basic two period DiD, I would be estimating an equation similar to: $$ y_{gt} = ...
2
votes
1answer
30 views

Endogenous ordered probit (Stata, R)

main equation $y_1 = y_2 \beta + x_1 \gamma + u_i $ Instrumental equation $y_2=x_1 \pi_1 + x_2 \pi_2$ I have a binary endogenous variable $y_2$ in my main estimation equation. My instrument $x_2$...
1
vote
0answers
26 views

Most reliable method to compute 95% confidence intervals of proportions for small samples

I am planning a prospective trial for CE mark of a new cardiovascular device, and wish to use 95% confidence intervals to present, once data are collected, the inferential estimate for the occurrence ...
0
votes
0answers
13 views

A model to track changes within ordinal dependent variable in Stata?

So for my research project I am looking at the effect of a type 2 diabetes diagnosis on frequency of physical activity. My dependent variable (activity frequency) is an ordinal variable with 4 values (...
0
votes
0answers
6 views

Stata takes first diffrence of ADF by default without specifing. Is this the same for the Phillips Perron Test? [on hold]

If I perform an ADF in Stata, I do not need to specify with a D. before the variable that I am taking the first difference. I wondered if this is also the case for ...
0
votes
0answers
23 views

Error correction model: Interpretation, confidence bounds

I have estimated an error correction model (ECM) regressing Household Debt on GDP. I am trying to show that Household Debt and GDP are two forces in a two-equation system that will cause a cycle. In ...
0
votes
0answers
6 views

How to generate a table from test statistics in stata [closed]

I ran "dfuller" on multiple variables and I would like to find out if there is any way to export the test statistics into a table with the corresponding p-values. Est-out or Est-tab dont seem to work ...
1
vote
1answer
25 views

Dickey Fuller and deterministic regressors

Can somebody help me with how I can determine what deterministic regressors(trend, drift and intercept) I shall include in the Dickey Fuller test. A Stata help file outlines four cases: 1 Random ...
1
vote
0answers
17 views

Estimation and forecasting ARMA: differences between Matlab and Stata

I have to forecast values from an AR(1) model. My sample is composed of 192 observations. I estimate my model with the 182 first observations and forecast the 10 last observations. I have done this ...
1
vote
0answers
11 views

How to Test for Some Basic Assumptions of (Zero Inflated) Negative Binomial?

I am currently working with a T dominant panel --time-series cross-section dataset-- that has N = 8 (eight European countries) and T = 28 (28 quarters for each country). The dependent variable --...
0
votes
0answers
13 views

Correct for trend and drift in my regression model

I am running unit-root tests (xtunitroot, dfuller: stata)on the variables in my panel data. The default specification of the test includes a constant term. On some ...
0
votes
1answer
39 views

Dickey-Fuller unit root test with no trend and supressed constant in Stata

I have seen in several papers that the $p$-value for the Dickey-Fuller (DF) test is reported for the test including trend and constant, then without the trend, and in the end in the absence of both. ...
0
votes
1answer
31 views

Understanding Fisher unit root test in Stata: trend, demean

I am testing a panel data set for unit roots. I am using xtunitroot fisher (option) dfuller (...
0
votes
2answers
47 views

In Stata, how to avoid negative values of lower confidence interval of proportion?

I'm trying to get the CI of a proportion in Stata. Starting with some reproducible example: ...
1
vote
1answer
63 views

Difference in Difference with multiple treatments with paired data observations (twin studies)

I have a data set of identical twins, such that the data can be considered as paired observations. The data is composed of a survey that was conducted on two separate years, and all twins answer the ...
3
votes
0answers
26 views

Presenting logistic regression tables for non-binary categorical variables (Stata)

For my logistic regression model I have a couple of non-binary categorical predictors (e.g income level and education) with more than three categories. My question now is how to present findings for ...
1
vote
1answer
22 views

Compute I-squared in individual patient data meta-analysis

I am working on an individual patient data meta-analysis, using a Cox proportional hazard model, with and without taking into account study identification, in Stata. A reviewer asked me to provide ...
0
votes
0answers
4 views

Derivation of variance function for mixed-effects negative binomial

In the Stata 13/Stata 14 manuals, the variance function for a two-level mixed-effect negative binomial is given as: Var(yij)=[1+{exp(sigma^2)(1+alpha)-1}E(yij)]E(yij) I have been trying to figure ...
0
votes
0answers
59 views

May I use a censored regression model for a truncated variable?

I am dealing with a truncated dependent variable (i.e.speed). To operationalise this variable I computed the months to take an action after an event. Then I normalised this value by dividing it for ...
1
vote
0answers
15 views

Multilevel Binary Logistic Instrumental Variables Regression

Context I have hierarchical data where individuals ($i$) are nested in groups ($j$) and am interested in examining the degree to which a continuous group-level variable ($X_j$) moderates the effect ...
0
votes
0answers
18 views

Multilevel nominal variables in regression

Can I use multi-value nominal variables as random coefficients in a multilevel regression model with an intercept included? For example: ...
0
votes
1answer
37 views

Can unit/time dummies be included with PCSE or XTGLS?

I am currently working with a balanced time-series cross-section dataset (or a T dominant panel), consisting in 8 units (countries) and 32 observations (quarters) per unit. Thus, the dataset has 8 x ...
2
votes
0answers
58 views

PCA for questionnaire reduction

I'd like to have some opinion regarding if I'm in the right way with my questionnaire reduction. I have a questionnaire with 275 questions and 34 issues (so a couple of questions are related to each ...
0
votes
0answers
6 views

Weighted binomial confidence interval in Stata [migrated]

I am trying to compute a binomial confidence interval for a dummy variable after specifying the survey design in Stata with the svyset command but I get the ...
1
vote
0answers
51 views

SE of a PSM with exact matching

I am evaluating and educational program with a PSM in STATA. Suppose that T= variable of treatment X= cofounders Z= variable with exact matching Y = output ...
0
votes
0answers
35 views

Why regression output is omitted in Stata?

I am a bit confused of why I get omitted output in my regression results when I know for the fact that all of those dummy combinations are alive and well in my data set: ...
0
votes
0answers
20 views

Lee (1983) sample selection correction with accelerated failure time model (in Stata)

I am trying to replicate the selection control used by Henderson et al. (2006), which is derived from Lee (1983). Henderson et al study CEOs over time and try to control for the likelihood that a CEO ...
2
votes
0answers
30 views

Should I use vce (robust) in a single year regression model?

Should I use vce (robust) in a single year regression model? The regression is for diversity measurement among 66 organizations in one year only
1
vote
0answers
64 views

Reducing variable candidates for multivariate regression step by step

I have a set of possible candidates that I want to use in a multivariate regression. I am trying to reduce this set by the following procedure (using Stata): Step 1: univariate regression (if ...
1
vote
1answer
38 views

Three-level mixed effects model with crossed effects in Stata [closed]

I have a dataset of individuals that includes their wage and occupations for several years. The data is in panel (long) format (xtset id year, yearly). I want to ...
2
votes
0answers
16 views

Should I include the level variables along with the difference variables in the Error Correctional Model(ECM)?

I am running an ARDL model, I have both levels and difference variables. I know for sure that the difference variables should be included in the ECM but should I include the level variables as well?
-1
votes
1answer
40 views

Include time dummies with xtreg,fe? [closed]

Is running: xtset panelvar timevar xtreg dep indep, fe the same as just running ...
0
votes
1answer
19 views

Where in this stata code does it indicate that the link test failed?

The link test was ran for a possion model. This picture was taken out of the Negative binomial regression textbook by Joseph Hilbe.
1
vote
1answer
21 views

Is it possible to conduct an alpha test on every bundle of 4 variables and only print that combo if alpha > X? [closed]

Basically, I have been experimenting with STATA for loops and am wondering if I could iterate over every group of four variables to run an alpha test and only print that bundle if alpha is higher ...
0
votes
0answers
54 views

IIA assumption in multinomial model

I try to verify the IIA assumption by using the suest. I have 4 categories of the outcome and I use : ...
2
votes
1answer
77 views

Expected number of cases, standardizing with age & sex of the whole population

Starting with a toy example data (http://www.stata-press.com/data/r14/hbp.dta) ...
1
vote
1answer
34 views

Elasticities for Multinomial Logit Model (Stata)

I estimat a multinomial logit model in Stata. Is it possible to compute elasticities from the MLogit model? If so, do I need to take the logarithm of the y and x variable, or only the log of x? I ask ...
3
votes
2answers
232 views

Fitting a smoothed curve to a noisy data

I have a variable with sales data over time. It is very noisy at a disaggregate level but if you look at it as a whole, you can see a smoothing curve that follows a polynomial pattern. Is there a way ...
0
votes
0answers
42 views

Difference in Difference With Multiple Treatment on Multiple Time Periods

I have panel data and I want to apply DiD. However, I don't have any specific time period for the treatment but treatment occurs at different time periods for different units. A unit may get treatment ...
0
votes
1answer
27 views

how to tabulate reference category

i've got a qualitative variable "profession" which can assume 5 different values which are: worker, office worker, teacher, employee management, manager. I choosed worker as the reference category so ...
1
vote
1answer
31 views

Chosing the right test for weekly disease counts

I am using STATA to analyze count data (weekly disease counts), and I am trying to pick the best test between Poisson, negative binomial and zero-inflated Poisson / negative binomial but I am not sure ...
1
vote
0answers
42 views

Stata rolling window forecast

I aim to forecast the SP500excessreturns using the rolling window option in Stata with the moving window of 120 observations (there are 500 observations in total). The code looks in the following ...
1
vote
0answers
28 views

R's pglm vs Stata's xtpoisson - R returns “Inf” standard errors

I'm running a fixed-effects Poisson regression and get different results in Stata and R. Unfortunately I cannot upload and share the data due to legal restrictions. My code in R is (formula shortened ...
1
vote
1answer
30 views

Poisson regression for ordered variables

I have three waves of data, and I am trying to estimate group-based trajectories of binge drinking across the three waves. The question asked (at all three waves was): “Over/During the past 12 months, ...
1
vote
0answers
22 views

How can I decompose the error after an ARIMA estimation, and how do I store the estimated values?

EDIT (in response to Stephan's comments): I was able to read a paper by Bessembinder & Seguin (1992) on futures trading and stock price volatility, wherein they used the ARIMA model to decompose ...
0
votes
1answer
35 views

Book about time series analysis in Stata

Does somebody know a good book which outlines the time series analysis in Stata, that is, the various commands explained. I am aware of the Stata manuals; however, they are not that user friendly for ...
0
votes
1answer
36 views

Interpreting group-level random effects of a multilevel model

I'm working with three level models in Stata. Example of one would be: ...
1
vote
1answer
22 views

How to find frequency of string data on repeated cross section using STATA? [closed]

So I am looking at a dataset for auctions. I have all the bidders who won something, and how much they bid. This auction takes place every year. I wanna see if the same people come back every year to ...
0
votes
0answers
6 views

Comparing between group HR for different age strata

I was asked by a colleague if i knew how to test if between group (cases and controls) HR were higher in one age strata than in another. The design: Matched cohorts of cases (with info on debut age) ...