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

learn more… | top users | synonyms

0
votes
1answer
11 views

Mata (Stata) Complex Matrix to String [on hold]

is there an easy way to convert a complex scalar (or matrix - i.e. something like sqrt(4i-2) into a string scalar or matrix. I am thinking about an equivalent of strofreal(). Thanks!
1
vote
1answer
30 views

Stata Margins tool

How does Stata create their margins dy/dx output? I would like to recreate some Stata output in SAS. The results of a logistic regression give a coefficient of 1.4921 for my dummy variable, and an ...
5
votes
1answer
29 views

Robust option in Stata: why are the p values computed using a Student distribution?

The commonly used "robust" option in the regress command of Stata gives standard errors using the Huber-White sandwich estimators. The t statistic also uses these standard errors. However I have ...
1
vote
1answer
23 views

Person-time still contributed after censorship? (Stata)

I feel like I might be going a little crazy here, so I'd appreciate some advice. I have a multiple-record-per-subject dataset that goes something like this: id | day | failure ----+------+-------- ...
0
votes
1answer
30 views

Forecasting in Stata

I am working with time series data and fitting an autoregressive model using OLS. For reference, here is my price data for the commodity (I am not sure how to better format data for this site): ...
0
votes
0answers
19 views

Missing data in Multilevel Longitudinal Model with Stata

I normally use xtmixed in Stata to test hierarchical linear models (e.g. performance of students nested in schools). Now it's the first time I need to test a ...
0
votes
0answers
26 views

Deforestation Scenarios using Logistic Regression (Stata)

I used Logistic Regression to model the contribution of a range of explanatory variables on deforestation processes (being my dependant variable - Deforested=1, No Deforestation=0) in the Brazilian ...
4
votes
1answer
47 views

Feasibility of Negative Binomial Spatial Regression

I have a set of crime count data where it appears that the data take on a negative binomial distribution. I have had some success converting the dependent variable (a crime count) into a rate and then ...
3
votes
1answer
38 views

Why is there no intercept in the lars output for LASSO in Stata?

This is my first time using lars, so this question is probably obvious. When I run lars on my data I get an output with a model and coefficients assigned to predictors, but there is no intercept. I ...
0
votes
0answers
21 views

How to calculate PRESS and $R^2_{predicted}$ in Stata automatically [migrated]

So I have two models and I want to calculate these statistics. Is there any package to calculate them in Stata? PRESS statistic (wiki) And, if I am not mistaken. $$ R^2_{predicted} = 1 - ...
0
votes
1answer
19 views

Comparing growth rates within a panel

I am conducting a POLS with a panel dataset of 27 countries across the time span 1950-2010 using Stata. My main focus is on how age structure, in particular growth rates of respective population ...
0
votes
0answers
17 views

Reference on interpretation of similar observed values and average adjusted predictions

I analyzed the association between a count dependent variable (DV) and a dummy independent variable (IV) (coded 0 and 1) ...
0
votes
0answers
13 views

How do you store marginal effects using margins command in Stata [migrated]

I'm estimating a regular probit model in Stata and using the margins command to calculate the marginal effects. I'm trying to ...
1
vote
0answers
10 views

Gllamm, gllapred and correct way of plotting results? [migrated]

I am trying to run a random intercept, random coefficient (usually referred to as random slope) multilevel logit model for cross-sectional data with cross-level interactions in Stata with the command ...
0
votes
0answers
18 views

How to estimate probit model with binary endogenous regressor using stata? [migrated]

The theoretical principle behind the estimation is clear to me (as is described on Wooldridge's textbook and some previous threads][1]) [1]: probit two stage least squares. However when I check the ...
2
votes
1answer
56 views

Year-fixed effects in a pre-post OLS regression analysis

Let's say I have panel data for the period 2000-2009 and I run a pre-post OLS regression analysis where the pre-period is 2000-2004 and the post-period 2005-2009. Does it make sense to use year*period ...
0
votes
0answers
29 views

Identification of Difference in Weighted Mean and its Standard Error in Clustered Data Using Stata

I already asked this question on the statalist but have not received any comments on this issue yet. So I am going to post it here too. I am concerned with the following problem. Suppose my data ...
2
votes
1answer
50 views

Very large odds ratio (558) in logit regressions

I have been running logit regressions on large samples in order of hundreds of thousands in a preliminary study that will eventually end up in non-parametric tests. Both my dependent variable and my ...
0
votes
0answers
21 views

packages in ado folder not showing up as installed in stata

I have to install stata packages on a machine that cannot be connected to the internet. I installed the packages the normal way (using the ssc install command) on another machine successfully, and ...
1
vote
1answer
46 views

How to test whether people remembered more items given an intervention administered within subjects?

I have 20 individuals who memorised 5 lists of information. They immediately recalled the information, then at the end of the day either received an interventional 'cue' or nothing prior to recalling ...
0
votes
1answer
28 views

Help with cluster analysis. Is this possible? [duplicate]

I'm working with the productivity of various government documents. In my data I have two variables (annual frequency and time of resolution) and each document gets its position in a Cartesian plane ...
3
votes
0answers
34 views

heteroskedasticity in logit/cox

I am using a logit and a cox proportional hazard model for my analysis, and the newest version of Stata. I have found that there are no tests to check for heteroskedasticity for logit/probit models, ...
1
vote
0answers
33 views

robust s.e. versus clustered s.e

I am using survey data and understand that many times it is appropriate to correct for heteroscedasticity due to (a) errors for groups of individuals being correlated and (b) specific sub-populations ...
2
votes
1answer
52 views

Logit - comparison of predicted probabilities

I am analyzing, for two different time periods, the probability that an individual will have outcome Y (=1 or 0) given that an event X has occurred (=1 or 0). A number of demographic variables are ...
0
votes
0answers
18 views

How to include multiple fixed effects in Stata

I am wondering how to include multiple fixed effects in Stata? Currently I am using factor variables (i.e. i.variable_name) to create a series of dummy variables to ...
0
votes
0answers
36 views

How to test equality constraint in two equations using two different datasets

I have two equations to estimate on two different datasets.I want to test if the coefficient for x are the same. The two equations are $Y_{1t} = \alpha_{11}*X_{1t}+ \alpha_{12} * X_{2t} $ and ...
0
votes
0answers
9 views

How do I code out “Don't know” in Stata? [migrated]

I would like to code out don't knows for a variable but not sure what coding I need to do so I thought it was existingvalue 77=. but this appears as unrecognised command
0
votes
1answer
52 views

“variance matrix is nonsymmetric or highly singular” in Stata; no SEs in table

I get the above warning in Stata when I run a (clustered-panel pseudo-Poisson ML gravity-) regression. Observations are pairs of countries and the regression includes dummies for each combination of ...
2
votes
1answer
56 views

three-way-interaction between two continuous and one binary variable using OLS stata

I'm facing difficulties in interpreting a three-way-interaction term. I'm using OLS and the three-way-interaction term is significant. Y is the response variable (continuous), X the predictor ...
0
votes
0answers
11 views

Help with fixed effects regression: adding variables turns regressors insignificant [duplicate]

after composing my model for estimating the relationship between the old-age dependency ratio (share of elderly, i.e. 65+ who are dependent on the working population) and GDP per capita, I stumbled ...
1
vote
0answers
50 views

Panel data with N < T heteroscedasticity and autocorrelation. Should I include country dummies?

I have panel data of $N=18$ countries with $T=72$ months. Heteroskedasticity and autocorrelation are present in the dataset. I was working in Stata with xtreg fixed ...
2
votes
0answers
42 views

Post-hoc Chi Square Test for Pairwise Comparison of 3 Groups

I am trying to do something that in my mind is probably simple and I'm probably just blanking on it. I am using Stata to compare 3 groups on a categorical variable. So, as an example, I would be ...
0
votes
1answer
28 views

GARCH models on stata [closed]

How do I impose non negativity conditions of GARCH models on Stata? when I fit a type of GARCH models in stata, some of coefficients became negative. What should I do about this? Another question is ...
0
votes
0answers
27 views

My GARCH model does not converge in Stata

I'm trying to model impact of oil supply shocks on stock prices using GARCH methodology. I have a sample of countries, some for which the GARCH model converges and gives reasonable estimates. For some ...
0
votes
1answer
31 views

Running multiple FE in Stata [closed]

So I have data from ~400 cities and 15 years. I am trying to do a regression of y on x and z with fixed effects for these. I have been trying ...
2
votes
0answers
139 views

Income and price elasticity for multinomial logit/probit and alternative-specific conditional logit/multinomial probit in Stata?

I have a question about estimating income/price elasticity of demand for multinomial logit/probit models in Stata. Lets say I fit a discrete choice model where the outcome is product chosen (4 ...
2
votes
2answers
131 views

Time-invariant variables not being removed in Fixed Effects model. And feasibility of addional time dummies in Fixed Effect/Random modelling

I am working with severely unbalanced Panel Data of a nations Fisheries where I have individual data from all deliveries made by every single vessel. Thus far I have reshaped the data so that every ...
0
votes
0answers
112 views

xtabond2 in Stata and Arellano Bond results

I have been using xtabond2 (Stata command by David Roodman to estimate a system GMM) in order to estimate a system of equations. I apply GMM on each equation independently in the system. each equation ...
2
votes
2answers
182 views

Standard errors of a two stage least squares regression, Stata

I use Stata. I am trying to replicate the ivreg output of a regression performing manually the first stage, predicting the instrument after the first stage and running the second stage regression with ...
1
vote
0answers
47 views

DCC (Dynamic Conditional Correlation) in Stata - very low at beginning?

my question relates to posts found at the following links: Dynamic conditional correlation in Stata and Estimating correlation with DCC GARCH which provide great detail on calculating and graphing ...
0
votes
0answers
61 views

Choice based conjoint with SPSS

Is it possible to run a Choice Based Conjoint analysis (preferably with also no-choice option) with SPSS? Do I need a particular package for that? if not possible with SPSS is it possible with Stata? ...
0
votes
1answer
51 views

Acceptable values for variance, aic and bic in multilevel models

I'm building a multilevel model from a sample of 820 observations at level 1 and 11 groups (level 2). I'm using stata xtmixed. Running the empty model (including ...
5
votes
1answer
66 views

2SLS but second stage Probit

I am trying to use instrumental variables analysis to infer causality with observational data. I have come across a two-stage least squares (2SLS) regression which is likely to address the endogeneity ...
3
votes
1answer
152 views

Acceptable values for the intraclass correlation coefficient (empty model)

I'm using xtmixed in Stata to test a Hierarchical Linear Model. My problem is that variance at level 2 is about 4% of the total variance. So most of the variance is ...
2
votes
0answers
42 views

Time Series Decomposition - autocorrelation of error term

I would like to do time series decomposition, but the error term has a serial autocorrelation at the end and I am freaking out because I have really no idea what to do with that. How I did it? I ...
-1
votes
1answer
29 views

Which logistic model should I use in Stata when I have a mix of categorical and scalar variables?

I want to run a regression in Stata. The dependent variable is a scalar categorical variable indicating life satisfaction ls (1= satisfied, 2= intermediate, 3= ...
2
votes
0answers
32 views

Aggregating forcast to higher spatial level

I am working on a project doing out of sample estimates of wheat yields at the village level in STATA. I am using a short panel 3 years and a sample of ~3000 villages. We are estimating a RE model and ...
1
vote
1answer
63 views

Customizing a graph with gray regions

I'd like to do a graph similar to this one with the gray regions to point the recessions in my graph. I have R and Excel and Stata, I'm simply trying to make it easy to distinguish the recessions by ...
0
votes
1answer
177 views

How do I interpret a variance ratio test in Stata?

I need help with interpreting output from a Variance Ratio Test in Stata. $f = 1.2988$ (my variance) $\text{Degrees of freedom} = 249, 493$ I have Ho: ratio = 1 as my null Ha: ratio != 1 Am I ...
0
votes
0answers
77 views

What is the difference between FE-PCSE and xtreg, fe in Stata?

Here is a very simple question: On country-level data, I am running two different fixed effect model, using Stata command, but I don't know why not only the estimation of standard errors, but also ...