Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
19 views

Getting "invalid 'type' (character) of argument" error with numeric values when I do apply.weekly(data$x, sum)

I have a time series object and I am creating a list of the variables at different timesteps. when I do apply.weekly( , mean) it works fine, but when I want to sum the values over a week it gives me.. ...
Tatiana's user avatar
0 votes
0 answers
41 views

Problem with dynamic linear model -> lagged variable explains 100% of my model [closed]

I created a regression model, which regresses a cycle component onto a lagged cycle component and various other variables. It looks like this: regoffice4 <- dynlm( diff(diff(officecycle,1),1) ~ ...
Alexander Holzinger's user avatar
2 votes
2 answers
50 views

Ploting weekly data with base::plot with unique and evenly spaced labels

I am trying to create a simple scatter plot, so weeks on the x-axis and "cases" on the y with each indicated by a dot and note I can only use base R's plot(), no ggplot. I have data with 156 ...
Fable's user avatar
  • 57
0 votes
0 answers
35 views

R – Model specification for TWO TIME variables AND PAIRED design in repeated measures generalised linear mixed model (GLMM) (in lme4 package)? [closed]

I’ve split the question into 5 parts. The whole/specific issue is on 5). 1-4) is double checking the underlying theory. My understanding from sources like Crawley, M.J., 2013. The R book 2nd Edn. ...
kris sales's user avatar
0 votes
1 answer
13 views

Forecast::ets throwing 'lastseason' error with weekly time series length > 52 ... bug?

I think I stumbled upon a bug? I have a generic forecasting process that runs ets on many different time series. Yes, I know that forecast::ets is not intended to work on data with frequency greater ...
dolphingang's user avatar
0 votes
1 answer
28 views

Dynamically perform calculation down column in R

I have data that looks like this: library(tidyverse) df<-tibble(date = as.Date("2024-07-01"), starting_n = 100, growth_rate = 0.05)%>% bind_rows( tibble(date = seq.Date(as.Date("...
costebk08's user avatar
  • 1,349
0 votes
1 answer
34 views

How to inversely transform time series predictions to add seasonality back in? [closed]

I have transformed some data to make it stationary before fitting an ARIMA(1,0,1) model. I specifically want to manually transform the data to better understand the process. I can successfully fit a ...
AlexMackayGU's user avatar
0 votes
0 answers
19 views

Is it possible to perform Rolling Origins on multiple time series with the modeltime package in R?

I am currently working on a project that involves multiple time series, and I would like to know if it is possible to implement a Rolling Origins technique for these multiple series using the ...
ds_user_1705's user avatar
0 votes
1 answer
20 views

How can I fit a `HoltWinters` model with the `fable` package?

I have a tsibble with data every 15 minutes. I want to simulate: ts_data <- ts(data$value, deltat = 1/96) # There is a daily seasonality model <- HoltWinters(ts_data) predictions <- predict(...
Telaroz's user avatar
  • 258
0 votes
0 answers
12 views

GLM for longitudinal or time-series -- how to model and interpret a binary logistic regression over time controlling for covariates using R [migrated]

I work with the risk of delays (0 = no risk, 1 = risk). I want to run a binary logistic regression considering panel data over time. I have data from 4 years (4 time-points) and some covariates (...
Luis's user avatar
  • 1,554
2 votes
5 answers
65 views

How to access row and column names (year and month) from a (monthly) time series, when rownames and colnames fail?

In monthly time series (frequency = 12), R prints out the years and months automatically, arranging them to look like row names and column names. But they are not accessible through rownames or ...
dolphingang's user avatar
0 votes
1 answer
33 views

Delete a single value in dataframe based on particular date and time

I have a dataframe and I want to delete a single value based on the date and time, I want to delete the value for Variable 2 on the 2020-06-15 14:00:00 with an option to replace the value 780.45 with ...
LZ24AP's user avatar
  • 55
0 votes
0 answers
48 views

Specifying an advanced GARCH model in R

I am trying to implement a specific kind of GARCH model in R. The simple description of the model is the following: I am trying to build an GARCH(1,1) model, where I_t is a dummy variable indicating ...
Tom_t's user avatar
  • 1
0 votes
0 answers
12 views

Custom function to create sequential index variable in longitudinal data [duplicate]

This is probably very basic but I'm having a hard time finding an answer to my question in existing posts. I'm working with longitudinal data and need to create a sequential index variable that ...
evedu's user avatar
  • 1
1 vote
1 answer
44 views

ggplot time series geom_line showing as a bar chart

I am trying to create a time series line chart with ggplot2 using the following code: ggplot(my_data, aes(Period_end_date, Value, group = `Policy Year`, colour = `Policy Year`)) + geom_line() + ...
Matta's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
417