Skip to content

spk57/SGLM.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Segmented GLM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages