Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
0answers
16 views

Longitudinal data: RM multilevel model vs. mixed ANOVA

My longitudinal data consists of yearly fund-level ESG ratings (environment, social and governance criteria; relative measure between 0 and 100) of 5000+ institutional investors over 10 years. These ...
1
vote
0answers
14 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
30 views

poisson test for comparing two groups [duplicate]

I want to compare the count data for a variable in two groups (before and after the intervention). The purpose of my study is to investigate the effect of intervention on a variable. My data relate to ...
0
votes
0answers
7 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
13 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
14 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
10 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 ...
2
votes
2answers
29 views

How do you perform Wilcoxon matched-pair sign-rank test in Stata using a grouping variable? [closed]

I'm performing a diagnostic method comparison study in which I have 2 groups; one assessed using the experimental method, and one assessed using the standard method. These groups are matched, with 3 ...
0
votes
0answers
14 views

Importing and transforming new time series quarterly data into Stata

Date Crude Oil Production (Thousands barrels/day) Economic Activity 1980 Jan 62348.011 34.913651 Data runs up to ...
0
votes
0answers
14 views

Regression discontinuity in STATA

I have a very basic question. I would like to implement a nonparametric RD using a dependent variable that is distributed as a Poisson. Can I use the rdorbust package even in this case? Is it possible ...
0
votes
0answers
9 views

GSEM Tobit margin

I am trying to estimate the marginal effects as follows but am unable to get it right. I run the tobit model and it shows ok, but am not sure how to replicate it with gsem. I am running Stata 14.2 MP. ...
0
votes
0answers
14 views

Not able to get inverted parabola for data (though theory says so)

can someone please help me understand the nature of the data and the unexpected results I have pertaining to my research question. Theory says that government support (tariff - FIT) for wind should ...
1
vote
0answers
15 views

Stata: Difference in Difference; common-trend plot [closed]

I estimate the following flexible difference-in-difference model with Stata: regress Y i.time i.time##i.treatment Starting from this model, I'd like to ...
4
votes
1answer
93 views

how to replicate the stata “margins, atmeans” command in R with the margins library

i'm trying to replicate the output of margins female, atmeans in R shown here: https://stats.idre.ucla.edu/stata/dae/using-margins-for-predicted-probabilities/ i ...
0
votes
0answers
29 views

Comparing the different levels of a categorical variable in panel data in R

In a panel dataset, I want to run a logit model with clustered standard error. I also want to compare the different levels of a categorical independent variable. This can be done in Stata using <...
1
vote
0answers
66 views

Are studentized deleted residuals &/or DFfits applicable in logistic regression?

Are studentized deleted residuals and DFfits applicable in logistic regression? In some statistical packages (Stata for example) these statistics are available in linear regression analysis, but not ...
1
vote
0answers
17 views

Granger Causality Interpretation using Stata

I am trying to characterise temporal sequence of influences in a VAR and wanted to use the Granger Causality. Based on these results, am I right to say that the change in oil prices (Dlop) do not ...
1
vote
0answers
30 views

VAR Model using Stata

I'm relatively new to the VAR model and have been using Sean Becketti's 'Introduction to Time Series Using State' as reference and wanted to check if I am on the right track. As of now, I have 5 ...
0
votes
0answers
39 views

Can Survival/Duration Analysis be used to model recovery from economic recessions?

I am currently completing independent research on how subcontracting affects the ability of the US economy to recover from the 2001 recession. I have my control variables and data for subcontracting ...
0
votes
1answer
25 views

Comparing OLS regression coefficients with SUR in SAS

I have the following code in Stata that I'm looking for the equivalent in SAS. Stata code: ...
0
votes
1answer
31 views

Lag regression independent variables in dynamic panel: which Explanation of the signs? [Resolved]

In the famous paper " Richard Blundell & Stephen Bond (2000): GMM Estimation with persistent panel data: an application to production functions, Econometric Reviews, 19:3, 321-34" the authors ...
1
vote
1answer
72 views

Multiple hypothesis testing in R vs. Stata [closed]

I'm trying to replicate Stata multiple hypothesis testing for SE clustered regression. Below I attach both Stata code and R code: ...
0
votes
0answers
15 views

Modelling CAPM with a time series dataset in Stata

I have a time series dataset and to model CAPM, I also need a risk free rate of return. I wanted to use the daily US 10-year bond yields as the risk-free rate. My data spans over 7 years. I have ...
1
vote
0answers
30 views

Linear regression Interaction Quadratic terms

In linear regression, if I have dependent variable Y and independent variables A and B, where B has a quadratic relationship with Y, and I'm looking for a possible interaction between A and B, I would ...
0
votes
1answer
69 views

Fitting model with unstructured covariance matrix with gls in R

Consider the following dataset: library(nlme) library(lme4) data<-sleepstudy data<-data[data$Days<5,] data$b<-sample(0:1,nrow(data), rep=T) I am ...
0
votes
0answers
22 views

Stata Logit model - sample size and clustering question

I would like to check if there is a relationship between mothers' fertility and grandparental childcare. I am using a cross-national survey dataset. I restricted the sample to 6 countries of interest ...
0
votes
0answers
20 views

Why won't a 3PL IRT run?

I'm running some IRT models on test data and encountered a new problem. There are 36 items (scored as "correct" and "incorrect") and 287 participants with no missing data. I'm using Stata (not by ...
0
votes
1answer
68 views

How to interpret the marginal effect of a dummy regressors in a logit model

I have a problem interpreting the marginal effect of a dummy variable in a logit model. (I am using Stata to estimate the logit regression) I've run a simple logit say this: ...
0
votes
0answers
38 views

How to deal with error Dependent variable never censored because of selection

I'm trying to use heckman model to deal with selection issues. My dependent variable is trust in the government and the independent variable is experience in interacting with a government official. My ...
0
votes
0answers
16 views

FAVAR estimation Boivin et. al.(2009)

Boivin et. al. (2009) following the paradigm of BBE(2005) manages to decompose the fluctuations of each series into common and series specific components and study shocks into these components ? Do ...
0
votes
0answers
18 views

Why is Stata smothed hazard estimate pruned to interval?

I have played through this R example to calculate hazard estimates. I chased the whole thing through Stata and obtained a different graph, though. R graph: Stata graph: What's the rationale ...
2
votes
0answers
31 views

Comparison between coefficients of two fixed effects models with same sample

I have a problem. I have two models of OLS regressions with time and group fixed effects of a crosscountry paneldata analysis: $$Y_i = b_1 X_i + b_2 D_1 Z_i + b_3 D_2 Z_i\tag 1$$ and $$Y_i = b_1 ...
1
vote
1answer
42 views

How to use a Non-Linear Ordinal Variable as (In)dependent Variable?

I am using the World Values Survey and the answers to my independent variable are as follows: Daily Weekly Monthly Never Answers to my dependent variable: Always Usually Never As you can see, the ...
0
votes
0answers
10 views

How does Stata test for collinearity? [duplicate]

My question is what stata is doing behind the scenes to detect collinearity. I previously assumed that it simply checked to see if there was a strict linear relationship between two variables, as in: ...
1
vote
0answers
12 views

How to show fixed-effects coefficients in Stata? [closed]

I am estimating a fixed-effects model on a panel-data using the xtreg, fe command. I hope to show fixed-effects coefficients in the table as well. Can anyone tell ...
0
votes
0answers
33 views

Grouped and ungrouped binary data: different results in R and Stata

I am working with grouped binary data in order to reduce my data from many individual observations (2.2m) to far fewer covariate patterns (approx 12.5k). Doing so should produce the same results in a ...
0
votes
0answers
12 views

Significance of monetary policy announcements

I would like to conduct a similar t-test to the one done in the following paper Ranaldo and Rossi (2007) see Table 4.1. However I only have daily data not intraday data. I have daily data for the ...
0
votes
0answers
21 views

Is there any way to adjust (shrink) the unusually large predicted values after running a fixed effect model

I am trying to run a 2SLS and therefore, I need to use the predicted values from the 1st stage and use it in the second stage. Code from my 1st stage - ...
1
vote
0answers
14 views

Degrees of freedom for successive differences weights

I'm analyzing the American Community Survey integrated public use microdata using the 80 successive differences replicate weights supplied with the 2012-2016 5 Year sample. I'm following the helpful ...
3
votes
1answer
84 views

Can the “vif” function in Stata be used to estimate collinearity in regression models?

I watched a video on collinearity and Stata, and it seems the author of the video is trying to get the variance inflation factor (vif) below 4, as a number above 4 would indicate collinearity. Is it ...
1
vote
0answers
45 views

Prediction interval for log transformed variable in Stata [duplicate]

I want to predict $y$ with $x_1$ and $x_2$, including an out of sample prediction interval. However, $y$ has large outliers, so I log transform $y$ and estimate $\log(y) = a + b_1 x_1 + b_2 x_2 + e$, ...
0
votes
1answer
30 views

analyzing difference between two groups by other numeric factor with only (0-5) values

I want to analyze the difference between two groups by other factor. the factor is numeric with distribution (0-5) only. using Stata® what would be the best test to estimate the significance of ...
2
votes
1answer
47 views

How can I reproduce the gllamm() Stata function in R?

I'm currently working in a project, where I replicate a project that has been conducted with Stata. I, however, work with R. The task is to estimate a multi level logit model. In Stata, the project ...
0
votes
2answers
44 views

Multiple comparisons repeated measures group by time interactions, with several time categories

I cannot understand how to analyse a really simple randomised controlled trial in R. I have two groups: Control and Intervention. Say there are 10 subjects in each group. These two groups are ...
1
vote
1answer
34 views

Fixed effect and clustering with 3 dimensional data

I have a sample of banks. These vary across time, rating agency and across countries. UPDATE: I trying to capture the effect of a regulatory change (dummy variable, 0/1) on a banks credit rating. I ...
1
vote
0answers
15 views

Difference-in-difference model: using difference year ranges for variables

I am working on a project that involves using the difference-in-difference method and was wondering if will ruin the outcome if I use a different year range for my independent and dependent variables. ...
0
votes
0answers
9 views

Usage of both FE and RE model in panel data

depending upon the value of Hausman test, RE model has been chosen to run the panel data model of 275 data points. Random effects model does not consider the group effects such as the change due to ...
2
votes
0answers
27 views

Should I include gender dummy for the probit regression in Heckman?

I'm estimating the wage equation for a selected sample which contains both males and females, afterwards which will be decomposed using the Oaxaca command in stata, by gender. The wage equation for ...
0
votes
1answer
99 views

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

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 ...