Is there an in-script command to save .do files?
Hello: I'm trying to figure out a way to archive local copies of my .do scripts as I run them. At the end of every one of my do files, I want to run a line of code that kicks out a version of the...
View ArticleHow to drop observations that change status from one year to another in a...
Hey, I have a panel data in which schools are my observations. Please consider: id_sc: school id year_pb: each year of the panel (2007, 2009, 2011, 2013), four years in total urban: dummy for school...
View ArticleOaxaca: error with large sets of categorical variables
Dear all, I am performing a Oaxaca decomposition with several sets of dummy variables, and the command works fine. But when I include an additional set of dummys, for 13 metropolitan areas, I get an...
View ArticlePooled Mean Group
Hi, I was trying to put the year and country dummies in PMG equation. But the country dummies it keeps omitting and also the year dummies it keeps omitting some years? Does anyone have some...
View ArticleMargins and marginsplot vs marginscontplot
Hi! I run a linear mixed model with splines for age and. The model contains a 3-way interaction with c.agespline*##c.cov1##c.cov2. I want to make a plot with age vs cov1 for different values of cov2....
View ArticlePanel data analysis: Random effects model - controlling for year and industry...
Hello everyone! I am new to the forum and have been going through a lot of past post, but I just haven't found the right answers to the questions, I am facing as part of my master thesis project. I...
View ArticleRename variable with its own label
Dear all, I am struggling with the following problem: I have several datasets I want to append, but the variable names differ from one dataset to the next. My variables are called very uniformative v1...
View ArticleEsttab or Estout to output (in quality tables) the results of several factor...
Hello Everyone, I am using Stata 14.2/IC and running a factor analysis with the same variables from 15 cycles of data collection. I know that the user written program estout by Ben Jenn (available at...
View ArticleHelp with Reshaping Data: Long to Wide ?
Hello, Good Morning. I need some help in converting this data from long to wide format so that I can have one record for each respondent. The dataset has the following types of variables: Resp: is the...
View ArticleMulti-level mixed-effects ordered logit model - not concave
Hi everyone, this is my first post, so please forgive me if I make any formal mistakes. I'm using Stata 13 and I want to fit a random coefficient ordered logit model with two levels, being country and...
View Article2 waves of data in one file, how do i split them up
I have 2 waves of data (year 1 and year 2) and I want to use the year 2 dependent variable (DV), with the year 1 independent variables (IV's). How do I separate these out? I currently I have run the...
View ArticleHelp with mediation analysis
Hi, I am new to the form. I have a dataset in which I am examining the effects of one (new) blood pressure treatment versus another (old) treatment in a clinical trial. I am using artery thickness as...
View ArticleInstall comand transcolorplot
Hi, Stata users! I would like to use the command transcolorplot introduced by Van Kerm in this paper http://medim.ceps.lu/stata/transcolorplot03.pdf . Following his advice, I tried to install the...
View ArticleMatching two variables
Hello everyone, I hope there is anybody who can help me. I have got the following problem: I have got a panel data set consisting of 18 waves. Every individual has got a number called "pid". The...
View ArticleStata question: how to use -margins- with -xtnbreg-
I'm now doing my final project, in which I like to study the interaction effect between level of urbanization (percentage of urban population) and level of democracy (polity2 score: -10 to 10) on...
View ArticleProblems with statsby and logit
Hello, I am new to Stata and I have a question for which I can not find a solution online. Any help would be highly appreciated I have to replicate a regression table where the regression coefficients...
View Articlesimultaneous equation model
I need to run a simultaneous equation model where one of my dependent variable is continuous and the other dependent variables are endogenous and binary. Following to Heckman's (1978) paper "Dummy...
View ArticleIs there an obvious reason why pca does not allow pweights?
I'm working with a PISA database of student answers to socioeconomic/background questions. Each student (i.e. each observation) has an assigned sampling weight. As there are many questions in the...
View ArticleSeemingly unrelated regression & within transformation
Hello, I am currently estimating labor demand elasticities by means of a panel dataset on firms. In this context, I conduct a seemingly unrelated regression (command: sureg, version: 14) for my system...
View ArticleData manipulation (change address).
I have the following data. A1 is the address of corporation. A2 equals 0 if the corporation does not change address, and 2 (or 1 and 3 when id==2) means that the firm moves to a new address 2. Code: *...
View Article