polmer {MPDiR}R Documentation

Ordinal Regression with Mixed-effects

Description

Regression models are fit responses that are ordered factors with (or without) random effects.

Usage

polmer( ...)

Arguments

...

dummy arguments as the function is deprecated. See below for where to find code.

Details

This function is a wrapper that calls glmer from the lme4 package if any random effect terms appear in the formula or glm, if not. The response term should be of class ‘integer’, as the function will coerce it to ‘ordered’. In the formula object, the random effect should be specified as the second level of random effect with the intercept removed. See the example below. This is a glitch for the moment. This function is now deprecated but the code can be found in the scripts directory in the file, ‘Ch9.R’.

Value

An object of class mer or glm depending on whether or not any random effect terms are included in the formula object.

Author(s)

Kenneth Knoblauch

See Also

glm, glmer, polr

Examples

#	data(Faces)
#	if(require(lme4.0, quietly = TRUE)){
	# no random effects specified - calls glm
#	Faces.glm <- polmer(SimRating ~ sibs, Faces)
	# random effect of observer - call glmer
	#  GLITCH: must specify random effect as second level of factor (levels of sibs are 0/1)
	
#	Faces.glmer <- polmer(SimRating ~ sibs + (sibs1 - 1 | Obs),
#		Faces)
#	}

[Package MPDiR version 0.2 Index]