1. 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...
  2. B

    Guidance for using propensity score matching in R

    I am new to programming as well as econometrics and would like to ask some guidance for learning. I am planning to calculate the effectiveness of a public works scheme in country A. By effectiveness I mean the rate of success by which participants were able to return to the open labour market...
  3. M

    Dropping observations w.r.t. 2 different variables

    Well, to be honest I do not know how to express my problem so I have uploaded an image. I need a command for Stata to exclude families that do not have children that are younger than 18. So, the data set should look like this after the exclusion...
  4. H

    sttocc to create a nested case-control study in stata

    Hi all, I am using sttocc to created a nested case control study, within an incident epilepsy population. The commands therefore reads as follows: stset censor, failure(case) enter (time entry) id(patid) scale(365.25) set seed 9123456 sttocc, match (gender yob entry_year) n(20) nodots...
  5. L

    extract first value from multiple columns

    i am trying to do this in R. it is equivalent to the stata command rowfirst suppose i have four columns as shown below (T1, T2, T3, T4). I want to create a new column (TX) which contains for each row the first element in columns T1:T4. ID T1 T2 T3 T4 A 0 2 4 5 B . . 6 5 C . 8...
  6. S

    Interpreting VECM/ ECM result

    Hi, I am currently working on a paper where I run a VECM and get significant values. However, I am not quite sure about how to interpret the output and how take the different values and express them with an equation. I run the test in SATA using the vec command Attached is a picture of...
  7. T

    Coding for control variables in Stata 14 in linear regression?

    Hi - I need to control for two variables in my linear regression, the code thus far is; sort dde2 by dde2: regress sustain I have two mediator variables or control variables, gender and ses and I need to remove their effects. Any help greatly appreciated!
  8. V

    multivariate regression problem - correlated residuals

    this question asks for help for a statistical/econometric problem I can't get the clue: I have a classic multivariate regression problem, i.e. dependent variables are stored in matrix Y having dimension n x p. So p observations come from the same respondent i and we need to expect correlated...
  9. B

    [STATA - gsem] Multilevel Structural Equation Model - Meta Analysis

    Hello, I am quite familiar with mixed effects (multilevel models) in meta analyses. Now, I want to do a mixed effects (multilevel) meta analysis structural equation model (MASEM) with STATA and the gsem package because my data format is long. My data look like: `id studyId...
  10. N

    Between and within group differences

    I am doing a research project on antisocial youth behavior and SES inequality. I am supposed to run two level logistic regression in STATA. There is an advise in conducting this analysis: "Distinguish between school vs within school differences in bullying, and then perform new descriptive...
  11. M

    Granger Causality and Heteroskedasticity

    Hello! My name is Magdalena and I have the following problem; I have daily returns of 60 firms from the year 2000 to 2015. My aim is to test for granger causality between them and to see which firms are leaders or followers over different time periods. I would like to test for Granger...
  12. G

    groups in xtmixed

    Hi all Having some issues with Stata when running xtmixed. The main issue being the number of groups (in initial Group Variable table) is not what I expect it to be. This is a 3-level model. The first is hospital, the second is individuals. As in individuals is the higher level , as they can...
  13. V

    My First Model

    Hello, I am doing a Master's and I am at the dissertation stage, and have to write and test a model empirically. However I am not sure about the functional form: Y = A(a)^Z + B(b/c)^Y + D(d)^X I want to estimate the effect of a on y. However I don't think the effect will have an elasticity...
  14. M

    Estimating treatment effect using movestay command

    Hello, I want to use the movestay command in Stata but my data is complicated and I’m unsure how to proceed. I would like to estimate the treatment effect on sales using endogenous switching regression for consumers who participated in a cashback and those who did not. More specifically, I...
  15. K

    Time-varying covariates in linear mixed models/multilevel models

    Hi! I am a Norwegian phd student exploring the effects of nocturnal road traffic noise exposure in children. One of the research questions is whether noise exposure at different ages (3, 5, 7, 8 years) is associated with body mass index measured at those same four ages (does the association...
  16. H

    Stata: Test that the difference between two groups = -1

    Does anyone know how to test the hypothesis that the difference between people without and with kids = -1 per night in Stata? I have the data set with kids as a dummy variable, but can't figure out where to start.
  17. J

    Gravity model

    Hi I am currently writing an assignment regarding a trade model using a gravity equation. The dependent variable in the model is Ln(X) and the non-dependent is both Ln (GDP, distance and so on) AND binary variables. So the question is: can I use SPSS for this kind of modelling or would...
  18. A

    Adding up values of variables

    Hey guys, I got a rather complicated problem: I have two variables, ID and Country ID Country 11 US 11 KR 11 CA 23 US 23 US 23 US 25 CA 25 JP 31...
  19. R

    Choosing the Correct Analysis - Comparing Categorical Independent Variables (STATA)

    So I want to compare the rates of infection in patients who received drugs A, B, C, and D. Patients could have received one, two, three, or all four drugs, and they could have been given each at different days during their stay. Infection could have happened before the drug was administered, or...
  20. C

    Pleease help!? Filling in "blanks" in Regression Output

    Hello! Can someone please explain, I need to fill in the blanks marked They provide this info in a row: Coeff:-9074.674 Std.Err: ?? p-value: 0.000 95% Conf.Intervall: -13272.86, -4876,485 How do I calculate Std.Err & t-stat here? Please help me, thank you! :) Best Regards