testing the difference in coefficients of separate regressions
Hello, Say I run Regression 1 on a sample of individuals. I get my slope coefficient (treatment effect) of interest. I then run Regresssion 2 on a sub-sample of the above sample (eg only males). I then...
View Article-mlogit- in multiple imputation with chained equations
I'm trying to run -mi impute chained- on a fairly large data set with a large number of variables. The code is too long to post here, but I think the following excerpt includes everything relevant:...
View ArticleGenerating groups within groups
Dear Statalist, I would like to generate a variable which indicates groups within groups. Consider the following data: ID INFO DESIRED_VARIABLE 1 A 1 1 A 1 1 B 2 1 B 2 2 C 1 2 C 1 2 D 2 2 D 2 Is there...
View ArticleUsing -reclink- to link big dataset
Dear Statalist, Below is an email I sent to Michael Blasnik, author of -reclink- inquiring about a problem I am having. Would you please share any advice you might have regarding my issue? Thanks, Dom...
View ArticlePanel Data, Tests, approach
Hello! I want to do a panelregression and I am new at this. I have prepared my data for panel data. And then I did the following tests: 1. Hausman-Test (Fixed or Random) 2. Fisher-Test (Stationarity)...
View ArticleIdentifying and storing the iteration number in a FOREACH loop
Hello, I'd like to set a conditional statement based on the first iteration of a FOREACH loop. I am not sure how to identify and store that indexed count, and currently the condition is hard-coded...
View ArticleIdentify variables with a particular value
Hello, I have a cross-sectional dataset with many variables, and I am attempting to compile a list (disaggregated by my groupvar, county) of instances in which any variable takes on the value of 5. I...
View ArticlePanel data: Tag students who moved to another school
Hello guys, My dataset contains students' movements to a series of schools. I need to compare how students behave in a specific school and how they behave when they were moved to another school (pre...
View ArticleMarkDoc Example do-files are available online
I have released tens of MarkDoc do-file examples for creating: - dynamic analysis reports with MarkDown, LaTeX, and HTML - exporting documents in Docx, HTML, PDF, LaTeX - creating PDF and HTML slides -...
View ArticleDensity of scaled chi squared distribution
Hi, I have a statistic that is distributed according to the chi squared distribution divided by its degrees of freedom. Is there a way to get cdf for this distribution similar to the function chi2(df,...
View ArticleOutreg2: use of stat(blank) adds dependent variable to output table
I am using outreg2 to output results what happens is that, as soon as I use the stats(coef tstat blank) command to display z/t-Stats and add a line to separe variables, the DEPENDENT variable also...
View ArticleToo many iterations with the same likelihood value in stcox command
Hi. I am running a proportional hazard model using stcox command. The only problem is that the command is very slow and I get 46 iterations for all cox regressions I run. Usually from iteration 12 or...
View ArticleCombining data with different weights
Hello everyone, This is my first time to forum. I would like to learn from others experience. I have two NIS data sets one from 2013 and one from 2008, both of which has different weights. All the...
View ArticleRounding issue with simulated data
Dear list, I am using Stata to do power calculations. I run multiple simulations with different parameter values, generate artificial data and estimate a model. The end result is a dataset that has one...
View ArticleVariable Labels Appear in List?
I apologize if this is too simple a question, but I want the colum headers of my list to be the labels of the variables as follows: Code: label var ldlvl "Liberal Democracy Level" label var fhlvl...
View ArticleUse of lincom for 3-way interaction of categorical variables
Hi everyone, I am trying to determine the OR of smoking (binary) among different groups accounting for a 3 way interaction between race, sex and education. race=0 if white and =1 if black sex=0 if...
View ArticleComparing coefficients across nested models
Hi, I'm interested in testing whether the effect of specific predictor variables change when adding a new variable to the model. So, does the effect of age on delinquency drop significantly when adding...
View ArticleData separation
Hello, I have US firms data from compustat and exeucomp. I have do my analysis for which I want to use only firms that were part of S&P 500 index. As there are firms present which are part of...
View ArticleWeird collapse/reshape: move observations one row below for a variable
I have a long dataset that contains stays in classes of a series of schools. The data look like this: ID school area startdt enddt 464 KC U16 1/6/2016 2:10 5/4/2016 8:32 464 KC U15 5/4/2016 8:32...
View Article