Can anybody give some detailed and simple explanation of contextual effects in multilevel modeling? Is it compulsory to use them? Also please provide some notes if possible.
Mathieu, J. E., Maynard, M. T., Taylor, S. R., Gilson, L. L. and Ruddy, T. M. (2007), An examination of the effects of organizational district and team contexts on team processes and performance: a meso-mediational model. J. Organiz. Behav., 28: 891–910. doi: 10.1002/job.480
When a predictor (e.g., stress) has multiple sources of variance (e.g., between-person--I can be more stressed than others--and within-person--I can be more stressed than I usually am), a contextual effect is the interaction effect on the outcome (e.g., number of cigarettes smoked). For example, if I'm more stressed than I usually am, I might smoke more. But if I'm more stressed than I usually am and I am also more stressed than most others, then I might smoke even more--more than someone else who is more stressed than they usually are but who isn't as stressed as me.
Alternatively, if you googled "#1 confound in science", you would find the definition for contextual effect--smooshing unique sources of variance into 1 pile and pretending that pile is homogeneous.
You will find in the Chapter 4 of my book on Multilevel synthesis.From the group to the individual, publshed in the Springer Series on Demographic methods and population analysis (2007), a clear definition and examples of contextual effects, different ways to measure them, with a contextual or a multilevel model. They permit to avoid the risk of atomstic fallacy when working with event-history analysis, and the risk of ecological fallacy associated with aggregate data.
Nice answers already, I add just a bit (dv = dependent variable; iv = independent variable; ses = socio-economic status (measured numerically) ; gender composition = % of male in the sub-sample or a cluster).
"Contextual/Compositional" effect is the expected difference in the dv (e.g., math) between two subjects (e.g., two students) who have the same iv value (e.g., same ses, or same gender), but belong to clusters (e.g., schools) whose mean on that iv (e.g., mean ses, or gender composition) differs by one unit.
In other words, if we keep the individual part of a predictor constant (e.g., two students with the same ses), but let the higher-level part of it (e.g., school ses) to be different, then the contextual/compositional effect asks: how different the dv (e.g., math) will be!