Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [stata]

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

0
votes
0answers
7 views

Simulation in Stata: instrumental variables with endogenous nonlinear regressor

I'm doing an exercise from Microeconometrics Using Stata, by Cameron and Trivedi, Exercise 11 of Chapter 6 (page 204). "When an endogenous variable enters the regression nonlinearly, the obvious IV ...
0
votes
0answers
16 views

Constant term omitted without specifying “nocons” in Stata

I ran a logit regression and the constant term was missing. How can this be? xtlogit vigact3 years years2 marpart logass RS RL i.time, fe this produces an output ...
0
votes
1answer
17 views

Is there any R package similar to 'tabout' in Stata [on hold]

Stata's tabout package is very useful in building publication quality tables (cross-tabulations) for export to a text file. Is there any such package for R?
0
votes
0answers
16 views

Can we apply statistics on replicated data (Nested repeated measure)?

In my study I have 2 groups i.e controls (n=23) and patients (n=30). And again in patients, I have 2 sub-groups i.e subgroup1 (n=15) and subgroup2(n=15). I have spinal cord area (SCA) at 4 different ...
0
votes
0answers
14 views

How to split a variable into two variables [closed]

I have a time series data (from 1948 to 2005) of USA on employment and value of output Data is industry-vise with two codes = 0 and 1. So, for each code the data on employment and value is available ...
0
votes
0answers
5 views

Orthogonalised Impulse Response Functions in Stata

This might be a really basic question for some of you but I have been looking up how to interpret impulse responses but most of the answers that were presented did not quantify the responses but ...
0
votes
1answer
38 views

Multiple Imputation of Coarsened/Interval Data

I'd like to know how to impute non-normally distributed data from interval data, where the intervals differ across different individuals. The variable I am interested in is the number of months an ...
0
votes
0answers
22 views

Is this approach correct to identify a bubble in Bitcoin's price?

I'm currently writing a paper about Bitcoin's fundamental value. I am using a VAR model to estimate the significance of a few variables in determining price movements in Bitcoin. There are two ...
0
votes
0answers
13 views

GMM of logit model in stata [closed]

I am trying to estimate the logit model by GMM in STATA with the following moments: $$E[X'(y - \Lambda(x'\beta))] = 0$$ And I have the following code in STATA ...
0
votes
0answers
20 views

Using 'by' with numerical data [closed]

In an assignment we looked at how there's a difference in mean earnings based on whether an individual's height is $\le$ 67 ...
1
vote
0answers
26 views

Is it possible to make an in-sample dynamic forecast / prediction for an ARIMA model?

We are trying to check to what extent the changing X-values might explain the observed trend in Y. By "in-sample" I mean: using the same data as was used for the model building. By "dynamic" I ...
0
votes
0answers
11 views

Should I use a difference-in-difference method for migration flows and average unskilled worker incomes or a lagged DV?

I am using data from a variety of sources to measure if migration inflows lead to an increase in unskilled worker wages. I am controlling for number of illegal immigrants, migrant unemployment, etc. ...
2
votes
0answers
33 views

Hausman test showing different results between R and Stata

I ran a Hausman test to compare random and fixed effects regression for a panel dataset in both R and Stata and found that the two are showing different results. The troubling thing is that the Stata ...
2
votes
1answer
73 views

How does one do a Wald test on estimates from two variables?

7.9.4. a) Given a dataset with two variables $X$ and $Y$, with each observation independent of the others, test the null hypothesis $$\mu_X = \mu_Y\\ \sigma^2_X = \sigma^2_Y$$ using a Wald test. ...
1
vote
1answer
27 views

Which R-squared value to report while using a fixed effects model - within, between or overall?

I am using a fixed effects model with household fixed effects. I just added a year dummy for year fixed effects. Here below is the Stata result screenshot from running the regression. In the ...
0
votes
0answers
20 views

Estimating effect of covariates operating thru another covariate with a twist [on hold]

A few things first 1) my title is a poor description of my problem; 2) my description (and notation) is poor; 3) and I'm still trying to figure out how to describe my problem. Say I have data ...
0
votes
2answers
30 views

Why is my variable being omitted by stata?

I am carrying out a fixed effect regression. I have a dummy variable called female. The dependent variable docvis refers to hospital visits. I created an interaction term between hhkids and female ...
1
vote
1answer
29 views

What's the minimum amount of observation for simple multiple regression?

I have a 16 year data for my dependent variable with 5 independent variables. is it ok to regress that?
1
vote
0answers
28 views

Quadratic interaction term dropping out in Stata but not in R

With the same data and the same model specification, Stata is dropping one of the terms from my model while R seems to run it just fine. For example: ...
0
votes
1answer
19 views

How do I interpret the coefficient of this interaction variable. Should I just be setting my dummy to 1 instead?

I have a dataset which looks at people's number of visits to the doctor. It includes a dummy variable for gender called female and a dummy variable called hhkids which states whether or not someone ...
0
votes
1answer
23 views

Should I be using pooled OLS or Fixed effect regression for my model here and why?

I have run two different regression models, one fixed effect and one pooled OLS on my data. my data looks at the number of visits to hospital regressed over age, marriage, income, insurance etc. I ...
1
vote
0answers
22 views

Is it ok to regress data with different units on stata?

for example... For variable trade my unit of measurement is US dollars For GDP my unit of measurement is in peso is it ok to regress that?
0
votes
0answers
11 views

How does missing data affect analyses using svyset?

I am running some simple statistics using Stata and its svyset command. Does listwise deletion of cases during analyses affect the svyset? Are results still going to be weighted properly and the ...
0
votes
0answers
16 views

SAS vs. Stata: Interpreting Tobit scale and sigma Coefficients

I'm trying to replicate a SAS script that imputes censored wage observations using a Tobit model in Stata. However, I'm confused ...
0
votes
0answers
27 views

Plummeting r-squared when instrumenting interaction term consisting of an endogenous variable

I've read the discussions about how to treat endogenous interaction terms when using an instrumental variable approach (2SLS) and followed the idea of Andy. However, in my case there is just one ...
1
vote
0answers
39 views

Violation of proportional hazard assumption with big sample size - how to correct for it?

I am looking at a sample of about 95,000 firms in Switzerland and I want to find out if having an external auditor (such as PwC, KPMG, EY) reduces the likelihood that a firm goes bankrupt. In ...
0
votes
0answers
22 views

Different standard errors from ivreg and ivregress 2sls commands

In stata 15, I accidentaly used the command ivreg without specifying 2sls. In the output, it declared that 2sls was being used so I proceeded. However, later when double-checking my results I used the ...
0
votes
0answers
14 views

Instrumental Variables for Foreign Direct Investment

I'm trying to estimate a fixed-effect regression model. Basically my Y is tertiary education enrollment (I'm trying to see the effect of FDI investment in host country, to the extent that whether ...
0
votes
0answers
27 views

Interpretation of average marginal effects for categorical and continuous variables

I'd like to make sure I'm interpreting average marginal effects for categorical and continuous variables correctly (interpretation of binary variables seems straightforward). Using Stata, I ran a ...
0
votes
0answers
18 views

How can I test for endogeneity after having used Panels Corrected Standard errors (PCSEs)?

How can I test for endogeneity after having used Panels Corrected Standard errors (PCSEs)? By endogeneity I mean the situation in which an explanatory variable is correlated with the error term. In ...
0
votes
0answers
23 views

Using exponential smoothing with modified z score

I am finding anomalies in my data. My data contains exit rate of a website for the last 3 years with a daily frequency. When using just modified Z score & finding anomalies, it does not take ...
0
votes
0answers
8 views

Family fixed/random effects cross section

What is the appropriate Stata command for a within family comparison in cross section dataset? Basically i hear a lot about such comparisons, siblings comparisons or within mother comparison…. Still i ...
1
vote
0answers
18 views

test for moderation in a quadratic regression model

I am trying to test for moderation in a quadratic regression model. my results show significant evidence of a quadratic relationship on one of the independent variables (x1) and also significant ...
0
votes
0answers
10 views

DiD estimator where all groups have some treatment

I am analysing some data on the impact of immigration on peoples attitudes to welfare. I wanted to use a difference in difference estimator as an exogenous shock caused immigration to drastically ...
0
votes
0answers
5 views

change a categorical variable to a numeric variable in Stata [duplicate]

if income in the data was asked as an interval qs, i.e. individuals allocate themselves within an income interval/category, how do I convert it into a numeric variable in order to get the average ...
0
votes
0answers
75 views

Stata: options vce(robust) and vce(cluster)

I have a panel of firm data and my supervisor recommended vce(cluster firmID) for clustering the standard errors. However, the ...
0
votes
0answers
12 views

Presenting regression model

I have a problem with writing the regression model in my thesis. For example below; Fixed effects model with year,town and industry dummies. 1) How should I write the dummies in the regression model?...
0
votes
0answers
8 views

What type of regression (and Stata approach) to use with 1 to 10 scale independent variables?

I'm looking to use regression analysis to compare the impact of certain training programs on whether a candidate won or lost. The independent variables (training programs) are number scores from ...
0
votes
0answers
17 views

Propensity score matching and DD over different event windows

I'm currently working on a project in which we are trying to investigate the operating (accounting) performance of seasoned equity offerings. To comprehend the endogeneity problem, we apply ...
0
votes
1answer
35 views

Including lagged dependent variable as independent variable in linear probability model

I am trying to replicate the Intention To Treat (ITT) analysis in one paper with two-period survey data(baseline period and followup period) and I am trying to estimate the linear probability model ...
0
votes
1answer
29 views

SARIMA help needed!

I have a data that seems to follow a seasonal pattern and trend, therefore I applied SARIMA in STATA to plot the acf and pacf. I used the first different of the seasonal difference (0,1,0)(0,1,0)12, ...
0
votes
0answers
26 views

Estimate on constant in diff-in-diff estimation is off-the-charts big

I've estimated a diff-in-diff using Stata - very simple situation: y = b0 + b1 T + b2 P + b3 TxP + e T = 1 means treatment, 0 is control. P = 1 means post treatment, 0 is pre-treatment. Problem: ...
0
votes
1answer
32 views

Dealing with different units and indexes in regressions

In my time series model, my dependent variable is a growth measure in percentage. However, one of my independent variables is an index that ranges from -2.5 to 2.5 - and is producing some extreme ...
0
votes
0answers
18 views

Correlation with nominal (three categories) variable and ordinal variable (likert-scale) [duplicate]

I have a "dependent" variable with three categories (adopted, not-adopted, and partially adopted). I have many "explanatory" variables that are ranked along an ordinal scale (Likert scale 1-strongly ...
1
vote
0answers
35 views

Selecting lag length for VAR Model. Differences or Levels?

I'm currently testing for optimal VAR lag length using the information criteria. I found that my variables are non-stationary (i.e. they have to be first differenced). When I identify the number of ...
0
votes
0answers
10 views

ordered logit for non ordinal categories

I want to use STATA to analyse the determinants of fertility. My dependent variable is the number of children born from a woman. Is it possible to use an ordered logit or probit when the variables of ...
1
vote
0answers
84 views

AIC and BIC formula for multiple logistic regression in survey data in Stata

In the recent article, for fit models, we only use parameters: crude, adjusted odds ratio, and p-value. The model fit criterion other researchers usually used it is the likelihood ratio test, but ...
1
vote
1answer
18 views

Recalculating Survey Weight from combining two datasets in Stata [duplicate]

So I am working on a research project where I need to combine two datasets from a community survey given every year in NYC. I am combining years 2016 and 2017 which have the same variables used for ...
0
votes
0answers
17 views

Decomposition of percentage changes

I am trying to implement a decomposition method used by Quigley and Raphael in a 2004 JEP paper on housing affordability. They describe the method as follows: "The decompositions are calculated as ...