key_slope: Fit linear model for each key

View source: R/key_slope.R

key_slopeR Documentation

Fit linear model for each key

Description

Using key_slope you can fit a linear model to each key in the tsibble. add_key_slope adds this slope information back to the data, and returns the full dimension tsibble.

Usage

key_slope(.data, formula, ...)

add_key_slope(.data, formula)

add_key_slope.default(.data, formula)

Arguments

.data

tsibble

formula

formula

...

extra arguments

Value

tibble with coefficient information

Examples

key_slope(heights, height_cm ~ year)


brolgar documentation built on Feb. 16, 2023, 7:49 p.m.