No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • mixed effects model with random slopes for categorical variables

    Dear all

    I am trying to estimated the effect of positive and negative changes in income on GHQ (well-being) with random slopes. After estimation i then want to extract the individual coefficients using reeffects.
    I have a large longitudinal dataset

    mixed GHQ c.income c.lagged_income gain loss ///
    c.mean_income c.mean_lagged_income mean_gain mean_loss ///
    || pid: || pid: gain no_change loss, nocons cov(id) vce(cluster pid)
    the panel variable is pid
    c.income is income this year
    c.lagged_income is income last year
    gain is a dummy variable if the individual had a positive change in income of above 5%
    loss is a dummy variable if the individual had a negative change in income of above 5%
    the reference category is no_change.
    I have include Mundlak type (individual means of the time-varying variables) which are shown with the mean_ prefix.
    I have include intercepts for each individual and random slopes for gain and loss.
    Is this correct? It is not obvious to me what covariance structure to use. Unstructured seems the most appropriate but cov(id) is default for categorical variables