Announcement

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

  • Preparing data for multilevel Analysis of EGO-centered networks

    Dear Statalist-community,

    I am currently trying to prepare a dataset for Multilevel Analysis of EGO-centered networks. (level 3: Schools -> level 2: EGOs -> Level 1: Alteri)

    The dataset contains information about the full network. This means that each Alter on level 1 also exists as an EGO on level 2 (With some exceptions due to non-response)

    This enables me to obtain Alter-Level variables based on respondents' answers, as each named Alter on level 1 is also an EGO on level 2.

    My goal is to generate new variables on level 1 out of the responses on level 2.

    This is how my data should look like after achieving this:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long id float(Source Target) byte AGE double Alter_AGE
    3001 3001 3085 17 18
    3001 3001 3096 17 18
    3001 3001 3079 17 17
    3001 3001 3018 17 16
    3001 3001 3012 17 21
    3001 3001 3106 17 18
    3002 3002 3056 19 16
    3002 3002 3117 19 18
    3002 3002 3107 19 19
    3002 3002 3028 19 21
    end

    In the example above, AGE represents the Age of EGO (corresponds to Source and id)
    Alter_AGE represents the Age of the Alter in the EGO-Network (corresponds to Target)

    The Variable Alter_AGE currently doesn't exist in my data. I want to generate it.

    How do I approach this in Stata 16?
Working...
X