Nothing
#' Extract residuals from brokenstick model
#'
#' @aliases residuals.brokenstick
#' @inheritParams predict.brokenstick
#' @param \dots Additional arguments. Ignored.
#' @return
#' A numerical vector with residuals The number of elements equals the
#' number of rows in `newdata`. If `newdata` is not specified, the function
#' looks for the training data in `object` as the element named `data`.
#' @family brokenstick
#' @export
residuals.brokenstick <- function(object, newdata = NULL, ...) {
newdata <- get_newdata(object, newdata)
return(newdata[[object$names$y]] - fitted(object, newdata))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.