|
592 | 592 | # if model has any distributional parameters, check if it's fixed or random |
593 | 593 | # and create component header |
594 | 594 | if (!is.null(dpars)) { |
595 | | - # add aliases |
596 | | - if ("zoi" %in% dpars) { |
597 | | - dpars <- c(dpars, "zero_one_inflated") |
598 | | - } |
599 | | - if ("coi" %in% dpars) { |
600 | | - dpars <- c(dpars, "conditional_one_inflated") |
601 | | - } |
602 | 595 | type_parts <- unlist(strsplit(type, ".", fixed = TRUE)) |
603 | 596 | if (type_parts[1] %in% dpars) { |
604 | | - if (identical(type_parts[2], "fixed")) { |
605 | | - component_name <- paste(type_parts[1], "Parameters") |
606 | | - } else if (identical(type_parts[2], "random")) { |
| 597 | + if (identical(type_parts[2], "random")) { |
607 | 598 | component_name <- paste(type_parts[1], "Random Effects") |
| 599 | + } else if (identical(type_parts[2], "fixed") || length(type_parts) < 2) { |
| 600 | + component_name <- paste(type_parts[1], "Parameters") |
608 | 601 | } |
609 | 602 | } |
610 | 603 | } |
|
696 | 689 | } |
697 | 690 |
|
698 | 691 | # clean some special parameter names |
699 | | - component_name <- gsub("zero_one_inflated", "Zero-One-Inflated", component_name) |
700 | | - component_name <- gsub("conditional_one_inflated", "Conditional-One-Inflated", component_name) |
| 692 | + component_name <- gsub("zi", "Zero-Inflation", component_name) |
| 693 | + component_name <- gsub("zoi", "Zero-One-Inflation", component_name) |
| 694 | + component_name <- gsub("coi", "Conditional-One-Inflation", component_name) |
701 | 695 |
|
702 | 696 | # if we show ZI component only, make sure this appears in header |
703 | 697 | if (!grepl("(Zero-Inflation Component)", component_name, fixed = TRUE) && |
|
0 commit comments