R/btmixMethods.R

Defines functions labels.btmix mscale.btmix

setMethod("worth", "btmix", function(object, component = NULL){
  cf0 <- parameters(object, component = component)
  rownames(cf0) <- gsub("coef.", "", rownames(cf0), fixed = TRUE)
  cf <- matrix(0, nrow = nrow(cf0) + 1, ncol = ncol(cf0))
  colnames(cf) <- colnames(cf0)
  rownames(cf) <- labels(object)
  cf[rownames(cf0), ] <- cf0
  apply(cf, 2, function(x) exp(x)/sum(exp(x)))
})

labels.btmix <- function(object, ...) object@labels
mscale.btmix <- function(object, ...) object@mscale

Try the psychomix package in your browser

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

psychomix documentation built on Jan. 31, 2020, 1:06 a.m.