Announcement

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

  • cluster

    Hi,
    I would like to regress and see the effect of education on work hour.
    But the thing is, I am not sure what variables should be in the option of cluster.

    The sample is individual in the household.
    Some households were selected in villages and some villages are selected in the district, and some districts are selected in commues.
    But, here communes in a country are all included.

    In this case, I tried this code:
    reg workhour education age sex income, cluster(communes)

    Should I include all of the variables that are clustered? like
    reg workhour education age sex income, cluster(communes) cluster(district) cluster(village) cluster(household)

    I am really confused of this concept and need your help.
    Thank you!






  • #2
    Shisho:
    q1) please, see: https://www.statalist.org/forums/for...t-and-cluster;
    q2) you should choose one level of clustering.
    Codes like:
    Code:
    reg workhour education age sex income, cluster(communes) cluster(district) cluster(village) cluster(household)
    are illegal.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      It seems you have a multilevel (hierarchical ) structured dataset. You may wish to type - help mixed - for that matter.
      Best regards,

      Marcos

      Comment


      • #4
        I do share Marcos' helpful insight, which was the same that I pointed Shisho to at https://www.statalist.org/forums/for...ct-and-cluster
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment

        Working...
        X