Skip to content
Back to skills

Fable

ASecurity

R fable package for tidy time series forecasting. Use for modern forecasting with tsibble integration.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 4, 2026
data

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill fable --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fable?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fable
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-fable/badge)](https://www.skillsdirectory.com/skills/leolin990405-fable)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fable
description: R fable package for tidy time series forecasting. Use for modern forecasting with tsibble integration.
---

# fable Package

Tidy time series forecasting.

## Setup

```r
library(fable)
library(tsibble)
library(feasts)

# Create tsibble
ts_data <- df %>%
  as_tsibble(index = date, key = id)
```

## Basic Forecasting

```r
# Fit models
fit <- ts_data %>%
  model(
    arima = ARIMA(value),
    ets = ETS(value),
    naive = NAIVE(value)
  )

# Forecast
fc <- fit %>% forecast(h = 12)

# Plot
fc %>% autoplot(ts_data)
```

## Model Specifications

```r
# ARIMA
ARIMA(value)
ARIMA(value ~ pdq(1,1,1) + PDQ(1,1,1))

# ETS
ETS(value)
ETS(value ~ error("A") + trend("A") + season("M"))

# TSLM (regression)
TSLM(value ~ trend() + season())

# Prophet
prophet(value ~ season(period = "year", order = 10))
```

## Multiple Series

```r
# Fit by group
fit <- ts_data %>%
  model(arima = ARIMA(value))

# Forecast all
fc <- fit %>% forecast(h = 12)

# Accuracy by group
accuracy(fit)
```

## Decomposition

```r
ts_data %>%
  model(STL(value ~ season(window = "periodic"))) %>%
  components() %>%
  autoplot()
```

## Cross-Validation

```r
# Stretch tsibble
cv_data <- ts_data %>%
  stretch_tsibble(.init = 100, .step = 1)

# Fit and forecast
cv_fc <- cv_data %>%
  model(ARIMA(value)) %>%
  forecast(h = 1)

# Accuracy
cv_fc %>% accuracy(ts_data)
```

## Reconciliation

```r
# Hierarchical forecasting
fit <- ts_data %>%
  aggregate_key(region / store, value = sum(value)) %>%
  model(ets = ETS(value))

fc <- fit %>%
  reconcile(ets = min_trace(ets)) %>%
  forecast(h = 12)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.