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
#> # A tibble: 1 × 11 #> p_value slope conf_low conf_high conf_level intercept r_squared sigma method #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> #> 1 2.09e-14 0.550 0.430 0.670 0.95 -0.242 0.451 17.7 Linear… #> # … with 2 more variables: n <int>, note <chr>#> # A tibble: 1 × 11 #> p_value slope conf_low conf_high conf_level intercept r_squared sigma method #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> #> 1 2.09e-14 0.550 0.430 0.670 0.95 -10472. 0.451 17.7 Linear… #> # … with 2 more variables: n <int>, note <chr>