Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ mstop.mboostLSS <- function(object, parameter = names(object), ...){
names(RET) <- names(object)[parameter]
if (length(RET) == 1)
RET <- RET[[1]]
# change mstop for noncyclical fitting to scalar value with attribute of partitions
if (inherits(object, "nc_mboostLSS")) {
partitions <- RET
RET <- sum(RET)
attr(RET, "partitions") <- partitions
}

return(RET)
}

Expand Down Expand Up @@ -273,8 +280,11 @@ print.mboostLSS <- function(x, ...){
cat("\n")
if (!is.null(attr(x, "call")))
cat("Call:\n", deparse(attr(x, "call")), "\n\n", sep = "")
m <- mstop(x)
if (inherits(x, "nc_mboostLSS"))
m <- attr(m, "partitions")
cat("Number of boosting iterations (mstop): ",
paste(names(mstop(x)), mstop(x), sep = " = ", collapse = ", "), "\n")
paste(names(x), m, sep = " = ", collapse = ", "), "\n")
nus <- sapply(x, function(xi) xi$control$nu)
cat("Step size: ",
paste(names(nus), nus, sep = " = ", collapse = ", "), "\n\n")
Expand Down Expand Up @@ -328,10 +338,11 @@ summary.mboostLSS <- function(object, ...) {
cat("\n")
if (!is.null(attr(object, "call")))
cat("Call:\n", deparse(attr(object, "call")), "\n\n", sep = "")
m <- mstop(object)
if (inherits(object, "nc_mboostLSS"))
m <- attr(m, "partitions")
cat("Number of boosting iterations (mstop): ",
paste(names(mstop(object)), mstop(object),
sep = " = ", collapse = ", "),
"\n")
paste(names(object), m, sep = " = ", collapse = ", "), "\n")
nus <- sapply(object, function(xi) xi$control$nu)
cat("Step size: ",
paste(names(nus), nus, sep = " = ", collapse = ", "), "\n\n")
Expand Down