Helper function returning all the levels of a grouping factor in a mixed effects regression model.
Mixed effects model of class 'mer'
Grouping factor of 'model' of which the levels are returned
Please note that at times different results may be obtained by using nesting.levels(), compared with deriving the levels of the grouping factor directly from the (original) data. This is because nesting.levels() only extracts the nesting levels that were de facto used in the model. Due to missing values, this may diverge from those present in the actual data.
Returns a character vector containing all the names / labels of levels of the grouping factor.
Rense Nieuwenhuis, Ben Pelzer, Manfred te Grotenhuis
1 2 3 4 5 6 7 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.