R/group.R

setMethod("group", signature(object="flexmix"), function(object) {
  group <- object@group
  if (!length(group)) group <- group(object@model[[1]])
  group
})

setMethod("group", signature(object="FLXM"), function(object) {
  factor(seq_len(nrow(object@x)))
})

setMethod("group", signature(object="FLXMRglmfix"), function(object) {
  factor(seq_len(nrow(object@x)/sum(object@nestedformula@k)))
})

Try the flexmix package in your browser

Any scripts or data that you put into this service are public.

flexmix documentation built on March 31, 2023, 8:36 p.m.