Aggregating categorical variables
Dear Statalisters, I'm currently working on my dissertation on the Impact of Immigration on Crime in England, Wales and Scotland. For that I've used the Annual Population Survey and ONS' crime...
View ArticleSearch for a string expression and replace it
Hi, I am using Stata 13 on Windows 7. I have some string texts in the variable labels that are enclosed in two curly brackets {} e.g {stephen}. I would like to go through all the variable labels,...
View ArticlePerforming Vuong's (1989) likelihood ratio test for equivalence of...
Hello everyone, does anyone know how to perform Vuong's (1989) likelihood ratio test for equivalence of explanatory power in nonnested models. More specifically, i want to compare the explanatory power...
View ArticleUnderstanding difference in estimates of main effects while using and not...
Hello Statlisters I am running a joint effects model using logistic regression. Binary outcome (status), joint effects between 2 binary exposures (CYP2A_D and biP32) , adjusted on a 4 category...
View Articlespmap - sequential and categorical colors
Dear all, I need some help with using spmap (am new to using GIS with Stata). I have a polygon map where I have an attribute that I could like to display using sequential colors. This works based well:...
View ArticlePerforming Vuong's (1989) likelihood ratio test for equivalence of...
Hello everyone, does anyone know how to perform Vuong's (1989) likelihood ratio test for equivalence of explanatory power in nonnested models. More specifically, i want to compare the explanatory power...
View ArticleImporting Multiple excel files and save it into dta
Hi, I am a newbie in using Stata. I am trying to import hundreds of excel files containing many variables in the Sheet1. The excel files' name are basically name of country: Albania, Afghanistan, etc....
View ArticleHow to find long-run elasticity using xtabond2
Dear all, I am currently running a regression using the Arellano Bond estimator via xtabond2: Does anybody know how to find the long run elasticity of the dependent variable eg laborrights? Thanks for...
View Articlemultiple 'foreach' possible?
Dear Stata-Users, I have a technical problem. I have a dataset with an 'id' variable and more than 100 variables named as: unemp528, unemp529, unemp530, ... unemp656. For each id (= region) the...
View ArticleRenaming Variables systematicallly
I currentlly have data that looks like the following: Code: * Example generated by -dataex-. To install: ssc install dataex clear input int year float(_b_1b_buyer _b_2_buyer _b_3_buyer _b_4_buyer) 1977...
View Article1 to many merge
I currently have data that looks like: ----------------------- copy starting from the next line ----------------------- Code: * Example generated by -dataex-. To install: ssc install dataex clear input...
View Articletest my posting
here is the question to ask. Now comes my data Code: * Example generated by -dataex-. To install: ssc install dataex clear input byte inst float operation byte centiles int dose 1 1 50 30 1 2 50 28 1 1...
View Articletwo way within-subject Anova for Centile results on categorical data
Statalisters- I'd appreciate advice on the following data. We are studying drug dosages used in two types of operations, using data taken from 30 different hospitals. Operation 1 generally requires...
View ArticleConstructing the equivalent of an “if then do” statement in Stata
Hello Stata Community, I have a Stata coding question. I have a dataset where subjects received 42 lifetime victimization items, but some variables (child maltreatment, sexual victimization) were...
View ArticleTwo part model for hazard ratio
Hello everyone, I read the following article: "twopm: Two-part models" The Stata Journal (2015) 15, Number 1, pp. 3–20. I have a panel data set that for each firm I have data up to the date that they...
View ArticleLabels in estout / esttab
Hi, I am trying to construct a table by stacking stored -tabstat- tables using -estpost- command. I am doing so because I want to display rows of stats for several variables in groups that are not...
View ArticleBioprobit and reference group without ib#
Dear Stat user's, I'm trying to run a bivariate ordered probit model using bioprobit. I tried to define reference group using the coma ib#.varname but it failed : "coding operators not allowed" or...
View Articlehow to plot different variables of different observations
Hey All, I have a question concerning the plotting functions. Consider: Code: // IMPORT DATA // The first part just generates data the way I have it, //such that you know my data structure. //Skip to...
View ArticleVersion 1.0 of brewscheme now available from SSC
Thanks to KitBaum the stable release of -brewscheme- is now available from the SSC archives. This includes tools for generating customized graph schemes, color interpolation, installing/defining named...
View ArticleUsing Standardised Coefficient Interpretation of my explanatory variables...
Hi all, I'm hoping to ask a question regarding the use of standardized coefficients under a 2SLS model. I have an econometrics project to do and my supervisor has recommended that rather than looking...
View Article