Creating an indicator variable for egonets of size 1
Posted: Wed Nov 05, 2014 8:34 pm
Hi all,
I want to run a cross-classified multilevel logistic model with four levels (individual, school, area, and friendship network). The situation with regard to friendship networks is similar to that of families in Rasbash et al. (2010), i.e., most individuals in the sample are the only member of a particular ego-net (because of incomplete sampling). Rasbash et al. use an indicator variable Dj that indicates whether an individual is an only child (Dj = 0) or a member of a twin-pair (Dj = 1). I need to include an indicator variable that indicates whether an individual is the only member of an ego-net (Dj = 0) or one of two or more (Dj = 1). In the model the random effect (Ufriend) is then multiplied by the indicator variable.
My question: How do I include the indicator variable in my model code?
Many thanks,
Bram van Leeuwen
Rasbash, J., Leckie, G., Pillinger, R., & Jenkins, J. (2010). Children's educational progress: partitioning family, school and area effects. Journal of the Royal Statistical Society: Series A (Statistics in Society), 173(3), 657-682.
I want to run a cross-classified multilevel logistic model with four levels (individual, school, area, and friendship network). The situation with regard to friendship networks is similar to that of families in Rasbash et al. (2010), i.e., most individuals in the sample are the only member of a particular ego-net (because of incomplete sampling). Rasbash et al. use an indicator variable Dj that indicates whether an individual is an only child (Dj = 0) or a member of a twin-pair (Dj = 1). I need to include an indicator variable that indicates whether an individual is the only member of an ego-net (Dj = 0) or one of two or more (Dj = 1). In the model the random effect (Ufriend) is then multiplied by the indicator variable.
My question: How do I include the indicator variable in my model code?
Many thanks,
Bram van Leeuwen
Rasbash, J., Leckie, G., Pillinger, R., & Jenkins, J. (2010). Children's educational progress: partitioning family, school and area effects. Journal of the Royal Statistical Society: Series A (Statistics in Society), 173(3), 657-682.