https://github.com/cran/cutpointr
Revision 8883cb6d23c8c690e6eeb8a8d074a5508e76f3d7 authored by Christian Thiele on 27 March 2019, 09:10:03 UTC, committed by cran-robot on 27 March 2019, 09:10:03 UTC
1 parent 7e56c82
Raw File
Tip revision: 8883cb6d23c8c690e6eeb8a8d074a5508e76f3d7 authored by Christian Thiele on 27 March 2019, 09:10:03 UTC
version 0.7.6
Tip revision: 8883cb6
user_span_cutpointr.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimize_metric.R
\name{user_span_cutpointr}
\alias{user_span_cutpointr}
\title{Calculate bandwidth for LOESS smoothing of metric functions by rule of thumb}
\usage{
user_span_cutpointr(data, x)
}
\arguments{
\item{data}{A data frame}

\item{x}{The predictor variable}
}
\description{
This function implements a rule of thumb for selecting the bandwidth when
smoothing a function of metric values per cutpoint value, particularly
in \code{maximize_loess_metric} and \code{minimize_loess_metric}.
}
\details{
The function used for calculating the bandwidth is 0.1 * xsd / sqrt(xn),
where xsd is the standard deviation of the unique values of the predictor
variable (i.e. all cutpoints) and xn is the number of unique predictor values.
}
back to top