View source: R/plotting_functions.R
smooth_dt | R Documentation |
Function returns the predictions from a simple generalized additive model that uses natural cubic splines to regress y on splines of x, with k knots, given the family
smooth_dt(x, y, k, family = c("poisson", "gaussian"))
x |
vector of x values |
y |
vector of y values |
k |
integer number of knots |
family |
string indicating family, must be either "poisson" (default) or "gaussian" |
vector of smoothed predictions
smooth_dt(x,y,10,"poisson")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.