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
0
votes
1 answer

Running into problems using the thetaf function in R

I am currently having some issues with the thetaf function in R (Which is from the 'Forecast' package.) The idea is that I am trying to create a forecast based on a tsibble from the previous year. The tsibble itself is daily. I have checked with the…
0
votes
1 answer

R time series forecasting trend line is wrong because of the indexing

I'm trying to figure out the answer to a question about forecasting. I'm using the tsibble package and following a textbook written by Hyndman and Athanasopoulos. It's a great textbook but also above my weight. https://otexts.com/fpp3/ Here is the…
hachiko
  • 671
  • 7
  • 20
0
votes
1 answer

struggling to regularize a time series using tsibble

I'm struggling to regularize a time series using the tsibble package. The documentation indicates that this can be done using index_by() + summarise(), but I'm clearly missing some details. Here's what I've…
Peter Nelson
  • 85
  • 1
  • 2
  • 7
0
votes
1 answer

Problem fitting a regression to time series with trending package

I am trying to fit a negative binomial regression to a time series using the trending package. When I try to calculate the confidence intervals and prediction intervals, I get the error message: Error in cbind(): ! Not supported for tsibble. ℹ…
P_aza
  • 107
  • 1
  • 8
0
votes
1 answer

How can I plot selected plot using autoplot + facet_wrap in R?

all. I need to plot selected one. I can plot all, but I can not fine how to plot what I select. for example ... date <- as.Date('2021-01-01') + 0:4 category <- c(rep("A",5), rep("B",5), rep("C",5), rep("D",5), rep("E",5)) product <-…
sean ahn
  • 11
  • 2
0
votes
1 answer

how to extract fitted values in a forecast model after multiple model simulations

This is my original df and fitted model library(tsibble) library(tibble) library(ISOweek) library(fable) library(forecast) library(fpp3) library(dplyr) library(tidyverse) Original.df <- structure(list(YearWeek = c("201901", "201902", "201903",…
0
votes
0 answers

Fable TSLM different models yield identical predictions

I'm trying to fit and forecast TSLM models with different time-t predictors added alongside the trend... for reasons I don't understand, several of the models yield identical predictions even though the the input test data appears different, and the…
ADF
  • 522
  • 6
  • 14
0
votes
0 answers

no non-missing arguments to max; returning -inf error with mutate

I have data as shown in the Shiny app code below. This data is a filtered part of a dataframe which has many Keys. The way I have filled in the gaps in the tsibble, there are N in the RSEXCL column in between Y's. I would like to make it so that if…
LauraDR
  • 86
  • 9
0
votes
1 answer

How to work with yearmonth from tsibble in ggplot and dplyr

Working example: library(fpp3) Data <- aus_retail %>% filter(State == "Western Australia", Industry == "Takeaway food services") autoplot(Data) + xlim() How would I go about doing something like limit the x axis or filter the data such…
0
votes
1 answer

Creating a monthly average column with weekly data R

I have a dataframe called Demandts and it is presented as a tsibble below: (with mam representing monthly MA) # A tsibble: 255 x 7 [1] # Key: Date [255] Week Demand Date mam Quarter Month year
0
votes
0 answers

Transforming tibble to tsibble

I've got a tibble that I'm struggling to turn into a tsibble. # A tibble: 13 x 8 year `Administration, E~ `All Staff` `Ambulance staff` `Healthcare Assi~ `Medical and De~ `Nursing, Midwife~
0
votes
0 answers

Forecasting future observations based off of lowest RMSE models

I asked this question over at RStudio community and received no answer so I figured I'd give it a go here. My question pertains to what budugulo asked here Select models with lowest RMSE but I'm wondering how I can go further and use the models with…
cap
  • 1
0
votes
0 answers

I want to mutate my tsibble by adding a new key so that it can be autoplot() friendly

I have quarterly data on the prices of 4 types of petroleum prices and trying to do some analysis on it. I am trying to get my tsibble from this: to a tsibble of this format: Essentially, I am trying to condense the 4 time series data by…
0
votes
0 answers

change tsibble frequency in R

I have a dataframe from 2012 to 2018 (first 200 rows below) and I am trying to transform it into a tsibble. Although I have already managed to transform it, using the UI variable as key and the Date variable as index, I had some troubles with my…
macs2021
  • 85
  • 1
  • 7
0
votes
0 answers

Is it possible to extract the adjusted r-squared and p-value of the f-ratio from fable in R?

I have used the fantastic fable package to produce multiple ARIMA models with different combinations of external regressors. Is it possible to extract the r-squared (adjusted for degrees of freedom) and the p-value for the f-ratio in a table format…
Unzy00
  • 1