Announcement

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

  • Defining Multilevel Model Given Mathematical Formulation

    Hi,

    I am new to Stata and I am having trouble finding the right options to use to define my model to Stata given a mathematical formulation.

    My problem setup is as follows

    DV: Choice (binary)
    IVs:
    Users U - each user belongs to only one Cluster C among 4 user clusters; All users are nested under one cluster
    DecisionType (I have three types C,F,G) ;
    Scenario (I have six Scenarios - lets call them S1 to S6)

    I want to test the following formulation

    Choice ~ a1*User (user fixed effect) +a2*Cluster (cluster level fixed effect) +a3* Cluster*DecisionType (response to Decision type depends on Cluster) +a4* Scenario*Cluster(Response to Scenario depends on Cluster) +a5*Scenario*Cluster*DecisionType (Three way interaction) +noconstant

    Cluster, DecisionType, Scenario are all categorical variables.

    Can someone please guide me as to the correct specification for this in Stata?

    I have tried many so formulations so far but i think this is the closest to what I want, but I am not a 100% sure

    Code:
    xtmelogit Choice i.Cluster##i.DecisionType i.Cluster##i.Scenario i.Cluster##i.Scenario##i.DecisionType || Cluster: ||User :, intpoints(10)
    I realize that I have 18 observations per user (one fore each decision type and scenario combination) and this may not be enough for convergence. In that case, I am okay to lose the user fixed effects
    Last edited by Vaidyanathan VS; 27 Nov 2019, 12:28.
Working...
X