1. Z

    How to extract dates (years) from a datetime variable

    Hello all, I am trying to extract the years from a datetime variable and do not seem to find a way. I am attaching images of what I see on STATA. Can someone explain to me in a simple way what I should do? Thank you in advance!
  2. J

    If mean is between two values, generate response?

    Hi, I am new to Stata and was wondering if it has a way to do something. I have tried researching a lot and can't find anything but im not sure if that's because I'm explaining it badly. I have data where people take a depression test and in the data they all have a score for this test. I want...
  3. T

    Multiple Meta-Regression in Stata Help

    I'm new to meta-analysis and to Stata. I understand how to use the user interface to insert multiple covariates into a meta-regression. However, I am not sure how to interpret the output and to make sure that the software has controlled for multiplicity and covariate correlation - so that I...
  4. C

    Creating age groups

    IN STATA I'm trying to make a new variable with age groups from a numeric variable, age. Don't understand why this code doesn't work: . recode Age (0/4 = 0 0-4)(5/9 = 1 5-9 )(10/14 = 2 10-14)(15/19 = 3 15-19)(20-24 = 4 20-24)(25-29 = 5 25-29)(30-34 = 6 30-34)(35-39 = 7 35-39)(40-44 = 8...
  5. S

    My recode just does not work, anyone who can help me?

    I have done this before and I just don't know what I am doing wrong. I need to create a dummy variable but it just refuses to recode the last numbers in to the second column. So what i do is i write recode logmag (0/2.772589=1)(2.833213/5.010635=2),gen(logmag_new) Then what it does it that it...
  6. T

    Conditional logit (with a different number of alternatives for each case)?

    Dear all, I have a question about conditional logit analysis, in particular analysis based on a McFadden-type choice model. I am using a model of firm relocation destination county choice using a 19th century panel dataset, with the main explanatory variables being county-specific variables...
  7. D

    How to interpret relationship between variables when one value has a disproportionate number of samples

    Hello all! I am in the beginning of a statistics project in my master's course which will be focusing on regression analysis later on. We have not yet done any regression analysis but have been asked to turn in a paper on initial findings and analysis, but I am having a lot of trouble in how I...
  8. S

    Stata project JOB CASH WORK

    Hi, I am new on this forum and completely new to stata. PROJECT FOR MONEY Nevertheless, I am supposed to prepare a small project about alcohol consumption (in a couple countries - any) based on a couple variables like sex, type of alcohol, country, tax, GDP, etc. The project should consist of...
  9. T

    Help with stats work

    Hi everyone at Talk Stats, I've really been struggling on the correct method to use to prove/disprove if my results are statistically significant. For the context in 2006/07, the UK tuition fees have changed from £1k to £3k and then again in 2012 to £9k. Attached is a text file of my collected...
  10. M

    Difference in Difference Method

    Hi guys! For some research we ran a regression analysis in Stata using the Difference in Difference method. this method uses a controlling group of countries to neutralise other effects than the effect of change in regulations. Afterwards we manipulated the data deviding it through year 2011...
  11. H

    Difference-in-differences in Health Economics Research

    Hi, I'm doing a difference-in-differences analysis of a health policy intervention. Health clinics are paid for the percentage of eligible patients who they give the right treatment to. The clinics are measured/paid separately for each type of treatment indicator. One year, some of the...
  12. G

    Create a dummy conditional on two other variables

    Hello there, I have data on European Union membership in the form of a dummy variable were eu_o = Origin is a member, eu_d=Destination is a member. I want to create another dummy variable that takes the value of 1 if both eu_o=eu_d=1. Is there a command to do this?
  13. S

    VAR Model Lag Length

    Ba I intend on estimating a reduced form VAR but I am struggling to choose a lag length. Initially my variables all contained a unit root but I first differenced them in order to induce Stationarity. Based on my estimation sample, the FPE, AIC, HQIC picked 4 lags while the SBIC chose 1 lag. I...
  14. T

    Logistic Regression Stata: ommitted due to collinearity ?? Help

    Hi there, I'm an MSc student in Medical Entomology and I'm in the midst of analysing data for my final project write up. My project is assessing the efficacy of different insecticide treatments applied in experimental huts against malaria mosquitoes. Now my dependent variables are: mortality...
  15. J

    Dynamic Panel Data for Financial Markets

    Dear all, I am trying to simultaneously estimate three equations using dynamic panel data. In each equation, the dependent variable (say, Y(3)) is a function of the two other dependent variables from that same period (say, X(3) and Z(3)), as well as the lagged values of the same dependent...
  16. S

    Stata - cross-sectional panel regression

    Hello, I want to predict returns of real estate investment trusts (REITs) in excess of the risk-free rate (rf), by using various explanatory variables which are market risk premium, the Fama&French factors and the Carhart momentum factor (MOM). For those not familiar with them; the market risk...
  17. C

    two-way mixed effects models

    I am trying to run a mixed effect model defined as: log(volume) = A + B*time + epsilon and A = A0 + A1*T + epsilonA B = B0 + B1*T + epsilonB The data is tumor volumes in two groups (T = 0 or T = 1) of mice, and each mouse's log(volume) increases linearly in time, but with slopes and...
  18. I

    STATA Logistic Regression Intepretation

    Hi, My dependent variable is goes to college coded 0=No and 1= Yes. I am not sure how STATA reads/ranks the dependent variable....thus I am not sure if I am interpreting correct. Predictor variables overeating status 1=does not overeat (reference) 2=sometimes overeat 3= always overeats and...
  19. C

    Extrapolation of yhat

    Hi, I am using non-linear regression ('nl' function, with independent variable of age) to estimate coefficient with the least sum of the square value (fitted non-linear curve). Later, I was using 'predict yhat' to predict the y-value for my samples with different age groups. However, the...
  20. N

    'mixlogit' and 'gmnl' commands not working with binary dataset

    Hello, My thesis is about Hybrid choice and multinomial logit. I´m using both commands 'mixlogit' and 'gmnl' in Stata for a dataset that: - Includes 12 choice tasks per person (a total of 81 respondents). - 3 different choices for each choice task - Just one answer must be selected (each...