explicit_rcs: Create a model formula with explicit knots

View source: R/explicit_rcs.R

explicit_rcsR Documentation

Create a model formula with explicit knots

Description

Create a model formula with explicit knots

Usage

explicit_rcs(data, formula)

Arguments

data

A data.frame / data.table object

formula

A model formula which includes an rcs component, such as y ~ age + rcs(bmi, 3)

Details

Returns a model formula with the number of knots replaced by explicit knot locations

Examples

explicit_rcs(iris, Sepal.Length ~ rcs(Sepal.Width, 3))

thomasgstewart/tgsify documentation built on Aug. 1, 2024, 4:55 p.m.