[R] plot.mob() fails with cut() error "'breaks' are not unique"

Jason Musil j.musil at gold.ac.uk
Tue Jan 22 18:16:58 CET 2013


DeaR all,

I am using mob() for model based partitioning, with a dichotomous variable (participant's correct/incorrect response to a test item) regressed onto a continuous predictor related to a given property of the test item. Although this variable is continuous, the value of this variable for many items in this particular analysis is 0. The partitioning criterion is self-reported ability in a related area.

> mob1 <- mob(
    correct ~ circular.mean | srp.dimension,
    control=mob_control(alpha=.001),
    model=glinearModel,
    family=binomial()
  )

> plot(mob1)

Error in cut.default(x, breaks = breaks, include.lowest = TRUE) : 
  'breaks' are not unique

The same persists if I specify either a desired number of breaks, or explicit breakpoints (e.g. breaks=3 or breaks=c(-0.1,0.1,0.5)). I guess this is to do with the funny distribution of the predictor variable, but I'm not sure what to do about it.

Many thanks and apologies if this doesn't fit the mailing list---it is my first posting!
Jason Musil



More information about the R-help mailing list