Why do I get different results for fe and gmm2s estimation using (xt)ivreg2?
Dear Statalisters, I am trying to analyze the relationship between corruption and the distribution of government spending (Similar to Mauro 1998 - Corruption and the composition of government...
View ArticleWhy do I get different results for fe and gmm2s estimation using (xt)ivreg2?
Dear Statalisters, I am trying to analyze the relationship between corruption and the distribution of government spending (Similar to Mauro 1998 - Corruption and the composition of government...
View ArticleTesting for serial correlation between the interest rate and its lags
Hello everyone, When including the interest rate into my time series model against the exchange rate, I attempt to carry out a Lagrange multiplier test to show whether there exists autocorrelation...
View ArticlePlotting Groups of Fixed Effects Coefficients, By Group, By Year
Hello all, I realize my title might be a little dizzying, but I wasn't sure how else to phrase it. I have a logit model in which I "manually" introduce country-time fixed effects (a single interacted...
View Articlefailing to rename a variable by its label
Dear all, I am interested in renaming several variables by its label (see an example below), however, after trying the code suggested by Nick Cox in the following post HTML Code:...
View ArticleRobustness checks - post regression graph
hey stata friends and family, After I use rreg / mmregress / mregress, I want to create a scatter plot (that would consider the weights of observations) with a regression line. I sometime use this line...
View ArticleHelp for replacing parts of a string variable
Dear community, I want to clean a string variable that contains the name of a bank. Sometimes, it also includes some numeric content (a percentage indication) as the example from dataex shows below:...
View ArticleParallel trends assumption test for a two way fixed effect model (omitted...
Hi everyone, I want to test for the parallel trend assumption in the difference in differences. My research design is about testing the change in corporate social responisbility behaviour due to...
View ArticleSet base group for 2 variables when including interaction terms in a regression
Dear all, I am currently running a regression in Stata that involves an interaction term between years and countries (this is a simplified regression because I am training myself in interaction terms)....
View ArticleResults of the Hsiao procedure for the homogeneity test on panel data
Hi Statalists, I work on a panel of 5 individuals and 38 years. I performed the Hsiao test to test the homogeneity of the data. Unlike most cases, I obtained p-values> 0.1 for the three tests. I ask...
View ArticleGologit 2 interpretation
Hi everyone, I have read Williams' article about Gologit2 model. I have some concerns about the interpretation of gamma, namely variables unconstrained to meet the parallel-lines assumptions. If I have...
View ArticleExtracting Residuals from loop regressions
Dear all, I would like to obtain my residuals from my loop regressions, but I can't find a way to extract them. I tried different ways, such as the command predict residuals, but this gives me a...
View ArticleHow is 'iweight' treated by the tabulate two-way command?
Hi, I'm working with the American Community Survey (ACS), a dataset with 3mio + observations. I often have to tabulate two variables I've created, namely naics2017 and skill (both numeric floats). I...
View ArticlePanel data model for policy intervention
Research question: I am writing a master thesis where I am analyzing the impact of a policy on the flow of investments from country A to country B. Data: I have highly(!) unbalanced yearly panel data...
View ArticleGenerating a binary variable conditional on multiple values from another...
I have a set of survey data, where I have the "Statefip code" for the US state an individual lives in. I want to create two binary variables: 1) NorthernStates: which has a value of 1 if they live in a...
View ArticleDifferent 'count' results, copying and pasting code
Hello, I am running Stata 14.2 on Windows 10. While using the count command to count the number of observations with certain values on two variables, I noticed the result in the output was incorrectly...
View ArticleObservations drop in xtlogit procedure
Dear Madam/Sir, I ran xtlogit procedure (logit fixed-effect model or conditional logit) and saw the following message that many observations dropped. It will be greatly appreciated if you give me an...
View Articlecharacteristic contents too long
I have two sets of categorical variables, each of which takes on a small number of integer values. I'm trying to form all interactions between members of the two sets using the -xi- command at line 4...
View ArticleInserting a new row into the data with gen and if statements
Hi Statalisters, I have data on Indian administrative units for the year 1991. Sample using dataex is below. On trying to merge this data with my master data I found that I was missing a few districts...
View Articlestore R squared and residual of foreach loop regression
Dear all, For our master paper, we need to replicate the Fama and French three factor model. We started with the one factor model. At the moment, we have 520 variables. We have one dependent variable:...
View Article