Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 699 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 699 Bytes

SGLM

Segmented GLM

Convenience functions to segement data and leverages GLM.jl to create separate linear models.

Leverages Generalized Linear Model (https://github.com/JuliaStats/GLM.jl) to model individual segments of a curve.

Usage

  • Use segment to break a DataFrame or a TimeSeries into segments
    function segment(df::DataFrame, segments::Int, breakpoints) where if present breakpoints are an array of rows to use as breaks
    function segment(ts:TimeSeries, period) where period is (Year, Quarter, Month, Week)
  • Use slm to call lm on each segment
    slm(f::FormulaTerm, v::Vector)

Examples

Note: Under Development