Questions tagged [tsibble]

R package for tidy time series (tsibble: Tidy Temporal Data Frames and Tools)

tsibble: Tidy Temporal Data Frames and Tools

Provides a 'tbl_ts' class (the 'tsibble') for temporal data in an data- and model-oriented format.

The 'tsibble' provides tools to easily manipulate and analyse temporal data, such as filling in time gaps, aggregating over calendar periods, and etc.

119 questions
1
vote
0 answers

How can I unnest a listcolumn of tsibbles?

I do not understand how I can unnest a listcolumn of tsibbles. I recently updated the R version of an old project, which caused non working code. Example data: library(tidyverse) library(fable) library(tsibble) library(tsibbledata) data <-…
Nhaj
  • 23
  • 3
1
vote
1 answer

Generating rolling forecasts with external variables in R

I am trying to generate rolling forecasts with R packages fable and tsibble. I can do this successfully if I don't include external variables in the model. An example can be found here:…
Giovanni Colitti
  • 1,982
  • 11
  • 24
1
vote
0 answers

ANOVA test on time series models

How can I run an anova test on the time-series models. Example code (from https://otexts.com/fpp3/holt-winters.html) library(tsibble) library(tidyverse) library(fable) library(forecast) aus_holidays <- tourism %>% filter(Purpose == "Holiday")…
Aman J
  • 1,825
  • 1
  • 16
  • 30
1
vote
2 answers

tsibble::fill_gaps and reference to numeric column name in variable

Here is my code: library(fpp3) library(dplyr) my_df <- data.frame("dates" = as.Date(c("2020-03-01", "2020-03-02", "2020-03-05")), "col_1" = c(1,2,23)) colnames(my_df) <- c("dates", "1") i <- 1 test <- my_df %>% as_tsibble(.,…
user1700890
  • 7,144
  • 18
  • 87
  • 183
1
vote
1 answer

Include all variables in tsibble formula

I want to fit a linear regression model using the tsibble package and I have a bunch of dummy variables that I want to include in my analysis. A sample dataset would be the following: library(tsibble) library(dplyr) library(fable) ex =…
User2321
  • 2,952
  • 23
  • 46
1
vote
1 answer

Specify interval, start and end in tsibble

I'd like to generate a fully paneled (monthly) time series I tried tsibble which works great for large data though for small sets with lots of missing data it seems to choose very wide intervals. Also, for easy comparison of many different sets, I'd…
Thomas
  • 1,252
  • 6
  • 24
1
vote
3 answers

Efficient approach(es) to convert a dataframe (or tibble) into a tsibble

I would like to inquire about suggestions on most efficient approach(es) to convert a dataframe (or tibble) into a tsibble. The dataframe has dates in the first column, and all other columns represent various time series with values given at the…
Aex
  • 131
  • 1
  • 11
1
vote
1 answer

Taking particular tsibble data out of the data frame

I am trying to solve a very simple problem. I want to take out a particular quarter data out of a tsibble. I have this code, library(tidyverse) library(tsibble) x <- tsibble( qtr = rep(yearquarter("2010 Q1") + 0:9, 3), group =…
JontroPothon
  • 127
  • 1
  • 9
1
vote
1 answer

Preprocessing tsibble to run time series models from fable package

I am trying to run some models on some monthly time series data. The times series data are not of equal length and also not starting/ending from/in the same month. What I have is a numeric month column and a numeric year column. I have created a…
JontroPothon
  • 127
  • 1
  • 9
1
vote
1 answer

Download forecast values from tsibble (Fable)

I'm sure this is a simple question, but relatively new here. I'm trying to extract the forecasted values in a CSV/table I can use outside of R. I followed along with the multiple series example from here:…
ben87
  • 65
  • 5
1
vote
0 answers

Can not use autoplot with a tsibble

I am following Rob Hyndman forecasting book and I can not use autoplot even in this simple example, extracted from the book: library(ggplot2) library(tsibble) y <- tsibble(Year = 2015:2019, Observation = c(123,39,78,52,110), …
sbac
  • 1,897
  • 1
  • 18
  • 31
1
vote
0 answers

Interpolate Time Series Using Weighted Loess in R

I have a dataset of multiple lakes with water level elevations through time. The observations are not regularly spaced and have many large gaps. Further, some of the older observations may be of lower or unknown quality. I created a separate model…
1
vote
1 answer

Reactively passing functions into tsibble index_by

I am having problems with reactively passing date-time collapsing functions into index_by function from package tsibble. index_by takes as an argument a time function (for example week() or month() from lubridate) and collapses the data…
ayasugihada
  • 329
  • 1
  • 2
  • 13
1
vote
1 answer

R: Forecasting multiple time series with fable, tsibble and map

I am trying to fit some time series using the R packages tsibble and fable, the still-under-construction replacement for the redoubtable Rob Hyndman's forecast package. The series are all combined into one tsibble, which I then fit with ARIMA, a…
andrewH
  • 2,281
  • 2
  • 22
  • 32
1
vote
1 answer

Class of index in fable::forecast

forecast function of package fable seems to have a strange effect on dates (index) # build a simple tible > df <- tibble( d = seq.Date(ymd('2018-02-12'), by = 7 , length = n ), x = seq_len(10)) # convert dates to yearweek objects > df <- df…
Andrea
  • 593
  • 2
  • 8