Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 951 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 951 Bytes

trendfilter

R-CMD-check

The goal of trendfilter is to solve nonparametric regression.

Installation

You can install the development version of trendfilter from GitHub with:

# install.packages("remotes")
remotes::install_github("glmgen/trendfilter")

Example

This is a basic example which shows you how to solve a common problem:

library(trendfilter)
library(ggplot2)
x <- 1:100 / 101 * 2 * pi
y <- sin(x) + .2 * rnorm(100)
out <- trendfilter(y, x, nlambda = 15)
plot(out) +
  geom_point(data = data.frame(x = x, y = y), aes(x, y), color = "black")