# stata's questions - English 1answer

1.073 stata questions.

### 1 How do I replicate these simple state space models from Commandeur's book in Stata? [on hold]

2 answers, 895 views time-series stata state-space-models
I'm working through the book An introduction to state space time series analysis by Commandeur and Koopman, and I want to replicate a few of the simple models in Stata 13.1. The two related models I'm ...

### Using Principal Component Analysis (PCA) to construct a Financial Stress Index (FSI)

I am trying to construct a financial stress index. I have selected 12 variables that I use as indicators of financial market stress. These are all time series of daily data (VIX, credit spreads, etc.)....

### descriptive statistics [closed]

0 answers, 17 views dataset stata analysis
I have some data with overall firm revenue. I have revenue by department (and further split into types of projects) and by fiscal year. I'd like to run some interesting descriptive statistics in stata....

### regression d'un modéle probit [closed]

0 answers, 10 views econometrics stata probit
I need to know the tests that need to be done for a probit regression model and the command of these tests with the stata ? Is it necessary to perform a multicollinearity test? I want to know how can ...

### 4 Interpreting VECM impulse response function

1 answers, 1.427 views econometrics stata vecm impulse-response
I have plotted IRF in stata with response S&P500 and impulse treasury bill rate. According to the model they are positively related. However, my irf graph is below zero(see the graph below). How ...

### What is the variance of the error term used by the logit command in stata?

1 answers, 25 views stata logit
I would like to compare the coefficients from the same model estimated by the logit and probit command. I think that the probit model is estimated normalizing the variance of the error term to 1. What ...

I’m using Stata 12.0, and I’ve downloaded the polychoricpca command written by Stas Kolenikov, which I wanted to use with data that includes a mix of categorical ...

### In R, How can I calculate the elasticity of Y with respect to X, when Y is binary?

0 answers, 17 views r regression stata probit elasticity
I have a dataset that I am doing in R and I need to calculate elasticities in it. To simplify my model, I have Y = XB + u, and I need to find the elasticity of Y with respect to X. My investigation ...

### 3 How to say if the variable is significant looking only at “t value”?

I have the model: Assuming we do not know the "p-value" I'm trying to analyse the significant variable looking only coeff. / std Err and t value. I'm a bit confused as if I looked beta which has a ...

### 1 Test equality between coefficients in STATA

I have a very basic question. I use two equations: y_{it}=\beta*X_{it}+\theta*C_{it}+ \sigma_{i}+\tau_{t}+\epsilon_1 \\ z_{it}=\omega*X_{it}+\sigma*C_{it}+ \lambda_{i}+\gamma_{t}+\...

### 1 Predicting probabilities after log-linear regression

I would like to estimate a log-linear regression and examine the results with Stata's marginsplot command. I have transformed my dependent variable into natural logarithm (to make a highly skewed ...

### 5 Endogenous interaction term in a triangular system using control function (CF) approach

1 answers, 546 views econometrics stata endogeneity

### 1 Bivariate probit versus 2SLS, contradictory results (sign)

I am currently facing puzzle and I hope some of you will be able to provide me some insights. I have this model: y: binary variable, x1: binary variable (endogenous), z: binary instrument, x2: ...

### 1 Choice of model for prognostic value of asymptomatic recurrence detection

I am involved in the final step of a project that evaluates the prognostic value of asymptomatic vs. symptomatic recurrence detection; all subjects experienced recurrence. The project proposed a ...

### 1 Correct autocorrelation when using reg3 in Stata

0 answers, 37 views time-series stata
I'm running a simultaneous equation model (three equations) on a time series dataset using reg3 in Stata. Some colleagues are concerned that the problem of ...

### Panel Data and Prediction/Forecasting

I have balanced panel data for around 130 countries, over three years. I ran a fixed effects regression using 'country' as my panel variable, and adding dummies for 'year'. I want to forecast the ...

### 1 Deriving predicted probabilities from gologit2 (proportional odds models) output

I am trying to understand the output from Richard Williams's amazing gologit2 STATA package. The software is used for ordinal logistic regression and circumvents violations of the proportional odds ...

### 4 Need to extrapolate missing monthly data from annual data; the monthly/seasonal index is reasonably well-known

1 answers, 464 views r time-series stata
I have a revenue dataset for various businesses. For about half of those businesses, monthly data is available. For the other half, only annual revenue data is present. I know the seasonality of the ...

### 1 marginsplot Stata: how to show MERs for categorical variables horizontally instead of vertically? [closed]

I ran an mlogit model in Stata. I then asked for the average marginal effects at representative values and now I would like to represent them in a graph. I have a ...

### 2 Industry and Year Fixed Effects

I hope someone can help me as I am stuck with this problem for quite some time. I have panel of S&P500 companies from 2010 - 2014 and I want to run a regression including industry and year fixed ...

### 2 Convert normal random variable into beta random variable in STATA

I need to generate two random variables - lognormal and beta distributed - while ensuring that the correlation between the two variables is -0.3. I generated two normal random variables with -0.3 ...

### 1 Logistic regression with categorical response variable [closed]

I need to find out out how opinion probability (continuous variable varying between 0 and 1) influences clusters (categorical variable - 6 clusters). I am using Stata and I see two possibilities: to ...

### 1 DIDM Matching with Difference-in-difference using cross-sectional data

I need to know how can I combine in stata the DID (difference-in-difference) model with the PSM (Propensity score matching) with cross-sectional data. I had searched and there are tones of answers ...

### propensity score matching with difference-in-differences for panel data

Research design utilizes companies that switched auditors (TREATMENT) and propensity score matched (PSM) companies that did not change their auditor (CONTROL). To obtain the propensity score for each ...

### 1 How to test for spatial correlation in the residuals of a dynamic panel data model?

0 answers, 293 views r panel-data stata spatial
I have an unbalanced panel on daily data for 8 months for 8 years on a pollutant. Thus, my T is very large and my N(number of cross-section) is 112. My model contains a lagged dependent variable as a ...

### 1 How to fix serial correlation in a cross sectional data set

I am doing my thesis at the moment and I needed to check the BLUE assumptions for my data set. I am doing my thesis on trying to explain IPO underpricing and my data set consists of 100 companies who ...

### Inconsistent signs of coefficients in regression models

Background: Our thesis explores the relationship between Corporate Social Responsibility (CSR) and Return on Assets (ROA). ROA is computed by multiplying the firm's Profit Margin with Asset Turnover ...

### 1 Multiple Stage Hurdle Model Analyses

0 answers, 10 views stata zero-inflation
I have a dilemma over the application of double hurdle model. Here is a description of the data that I want to analyze: 1. Binary info on household purchase of different milk products 2. If ...

### Differences between Stata svy and R survey

0 answers, 24 views r stata survey
I'm trying to replicate example 5.7 in Applied Survey Data Analysis (2nd edn). The text example is in Stata and I'm trying to replicate in R. With my svydesign object, I get exactly the same results ...

### 2 How do I run a two-part model of health care expenditures in Stata?

1 answers, 1.821 views logistic stata
Does anyone have Stata code they could share with me so that I can run a two-part model to look at health care expenditures? The first part of the model will determine whether or not an individual had ...

### -1 can I break line in the middle of variable list, in a do file in Stata [closed]

I am writing a Stata do file, I am doing a regression (actually gologit2, but I don't think this detail is important) with a long list of IV's. It would really help ...

### 7 Hausman test for panel data, fe and re. Error in the estimation, what to do? Stata

2 answers, 34.967 views stata econometrics panel-data hausman
I am performing a Hausman test on panel data to determine whether to choose Random Effects or Fixed Effects for my analysis. After performing the test I get this error: ...

### -1 Concatenating distinct values contained within a string [closed]

1 answers, 13 views panel-data stata data-cleaning
I have a string variable (drugs) that contains a list of drugs prescribed at each line of treatment. I'm looking to create a new string that contains only the unique drugs from each line. In the ...

### Using B-coefficients from logit in a linear prediction equation (Stata 13)

0 answers, 29 views stata logit
This is probably basic, but the answer has eluded me so far... In Stata, if one runs the logit command, coefficient values are given. For the variables with p-...