Basic coding question for out of range values
What code do I use to identify out of range values for variable X given a range of 0-50
View ArticleWhen importing data from excel all numbers are in red
hey everyone sry for bad english, i have some trouble with stata 12. when i import an excel document the numbers are in red, and i cant work with them. i tried this: destring, replace. some columns has...
View ArticleHelp with longitudinal bar graph?
Hello, I am using Stata 12.1 and wanted to ask a question. I have longitudinal data on tuberculin skin test results. Participants are tested at baseline (with an initial test between 0 and 5) and then...
View ArticleBasic coding question to predict value
How would I write the STATA code to predict a variable's value as a function of a variety of other defined variables? Like, predict value X given variable W, variable Y and variable Z
View ArticleDifference-in-difference equation
i wanted some guidance on some test i am performing. Basically i want to see the difference between the effect of unionisation on 13 countries grouped into 3 that dont have unions and 10 that have...
View Articletwoway with by() when the by-variable has 3 levels
Dear Statlisters, I'm using twoway to make forest plots. If I use: twoway ( ), by(cat2var) [I use rcap and scatter inside the twoway parentheses] I get something like what (I hope) is attached--two...
View ArticleAsclogit in Stata 14 vs Stata 13
Dear Statalist members, I would appreciate your help with the following issue I encountered. I am using command asclogit. I used Stata 13 first. Now, I try to run same regression with the same data...
View Articleusing probit as first stage in two-stage regression, and interacted variables
Hello Statalist, I'm hoping someone might take the time to help me - it would be much appreciated! I am trying to ascertain the treatment effect of being in a programme but as the assignment to the...
View Articlelars command for lasso regression - no output
I am using the "lars" command (https://ideas.repec.org/c/boc/bocode/s456860.html) to run Lasso regression. I'm using this command / analytic method for the first time, and ran this on different sets of...
View ArticleQuantile Regression
Dear fellow Statalist users, I have a question about model evaluation of quantile regression and I would appreciate it if you could help. How do we evaluate the overall performance of a quantile...
View Articlextabond help
My analysis uses 12 regions over 8 years. The dependent variable is total crime incidents/population (tcrimepop) and the main independent variable is percentage of immigrants (imm). After using the...
View ArticleLoops over lincom and nlcom
A simplified version of my regression looks like reg y l(0/3).x l(1/3).y Post-estimation I would like to test the following linear combinations: lincom x lincom x + l.x lincom x + l.x + l2.x lincom x +...
View ArticleLittle problem on checking my null model and ICC for logistic model with...
I am using stata 13 to run my data. The data is consisted of 45.607 observations. It is binary logistic with multilevel. When I was running my null model (which is ONLY include of respon variable and...
View ArticleCan someone help convert this SAS simulation code to Stata?
Hi everyone, I have a SAS code for simulating the effect size and standard error for a meta-analytic data-set of K studies over L iterations. Would be very grateful if someone could help convert this...
View ArticleNegatively correlated endogenous variable and its instrument
Hello everybody. I would like to ask one (maybe basic) question. I have an endogenous variable and its instrument and these two are negatively correlated. Is the interpretation still the same? That is,...
View ArticleBoostrapping with two-stage estimation
Hi all, I'm estimating a two-stage model where a coefficient from the first stage is used as a regressor in the second. The first stage estimates region-specific coefficients (either by running...
View ArticleTesting for heteroskedasticity
I am conducting a regression model in stata to determine the impact of paternity leave on several labour market outcomes. The regression looks like: y = dummy + linear + linear + squared I would like...
View ArticleWesterlund Panel Cointegration Test xtwest
Dear Statalist users, I am investigating the Environmental Kuznets hypothesis in a balanced panel framework with T=21 (1991 - 2011) and N=21 and all variables in log. In order to capture the hypothized...
View Articledates and multiple labels in graph hbar
Hello, I'd like to make a fancy bar chart, but I'm having some issues. I'm trying to make something that looks like this: |**US**********29March2013 |**UK*************** 10May2013...
View ArticleGenerate initial GDP in unbalance data
Dear all, I have a small question. I want to generate the initial value for GDP/capita. I have 98 countries but the panel is unbalanced. The period is 2000-2013. Most of the times the initial GDP...
View Article