regression | R Documentation |
Functions to do fast regression modelling. The functions return a tibble with statistics. Use plot()
for an extensive model visualisation.
regression(x, ...)
## Default S3 method:
regression(x, y = NULL, type = "lm", family = stats::gaussian, ...)
## S3 method for class 'data.frame'
regression(x, var1, var2 = NULL, type = "lm", family = stats::gaussian, ...)
## S3 method for class 'certestats_reg'
plot(x, ...)
## S3 method for class 'certestats_reg'
autoplot(object, ...)
x |
vector of values, or a data.frame |
... |
arguments for |
y |
vector of values, optional |
type |
type of function to use, can be "lm" or "glm" |
family |
only used for |
var1 , var2 |
column to use of |
object |
data to plot |
runif(10) |> regression()
data.frame(x = 1:50, y = runif(50)) |>
regression(x, y)
mrsa_from_blood_years <- c(0, 1, 0, 0, 2, 0, 1, 3, 1, 2, 3, 1, 2)
mrsa_from_blood_years |> plot()
mrsa_from_blood_years |> regression()
mrsa_from_blood_years |> regression() |> plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.