linear_model | R Documentation |
Performs a linear model for
linear_model(x, y = NULL, conf_level = 0.95)
x |
numeric vector |
y |
optional time variable, converted to numeric. If its not provided it will be assumed that all values in X are sequential, regularly measured, and there are no gaps in the measurements. |
conf_level |
numeric. Level of confidence to be used to calculate the confidence intervals |
a tidy data frame with the model results
x <- runif(100) * 1:100
linear_model(x)
# If measurements were for example taken daily
linear_model(x, y = Sys.Date() + (1:100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.