https://github.com/cran/cutpointr
Raw File
Tip revision: 94a7e298b1a50d93e8a9ccb813a070f7b30f3da1 authored by Christian Thiele on 21 March 2018, 08:27:24 UTC
version 0.7.2
Tip revision: 94a7e29
cutpoint_knots.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimize_metric.R
\name{cutpoint_knots}
\alias{cutpoint_knots}
\title{Calculate number of knots to use in spline smoothing}
\usage{
cutpoint_knots(data, x)
}
\arguments{
\item{data}{A data frame}

\item{x}{(character) The name of the predictor variable}
}
\description{
This function calculates the number of knots
when using smoothing splines for smoothing a function of metric values per
cutpoint value. The function for calculating the number of knots is equal
to \code{stats::.nknots_smspl} but uses the number of unique cutpoints
in the data as n.
}
\examples{
cutpoint_knots(suicide, "dsi")
}
back to top