Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Help #3

Open
MohamedaliS opened this issue May 8, 2019 · 5 comments
Open

Need Help #3

MohamedaliS opened this issue May 8, 2019 · 5 comments

Comments

@MohamedaliS
Copy link

I am using a "10 years" monthly time-series data to run this code. But getting "Error in data.frame(c(10^as.numeric(-colMeans(bsts.model$one.step.prediction.errors[-(1:burn), :
arguments imply differing number of rows: 144, 120"

d2 <- data.frame(

# fitted values and predictions

c(10^as.numeric(-colMeans(bsts.model$one.step.prediction.errors[-(1:burn),])+y),  

10^as.numeric(p$mean)),

# actual data and dates 

as.numeric(AirPassengers),

as.Date(time(AirPassengers)))

names(d2) <- c("Fitted", "Actual", "Date")

Please help me to sort out this error.

@klarsen1
Copy link
Owner

klarsen1 commented May 9, 2019 via email

@mcui123
Copy link

mcui123 commented Feb 28, 2020

I have actually encountered same issue as @MohamedaliS and couldn't figure out why.

@klarsen1 Can you specify what is "have holes" in time series?
For example, for my daily time-series data, does that mean I don't have data for each single day? Do I have to have a data entry for each day? What if I have multiple data entries in a day?

Also, the fact that the traceback error suggests its off by exactly the "horizon = xx" (in my case) makes me wonder what went wrong....

Thanks so much in advance!

@klarsen1
Copy link
Owner

klarsen1 commented Feb 29, 2020 via email

@mcui123
Copy link

mcui123 commented Mar 2, 2020

Thanks so much @klarsen1 ! I was able to fix the issue from your recommendation.

I have tried your code on my own set of data, and have encountered another issue - the burn out rate is very high (e.g. with 500 MCMC iterations, bsts suggested a burn out number of 497), which I think could be the reason why my MAPE is as high as 70%+.

FYI. I have 3 years of daily data (I aggregated by day so that I don't have multiple entries in a same day). My holdout period is 30 days. Just wondering if you have any insights as to whether there are any other way to improve model accuracy?

Best,
JC

@klarsen1
Copy link
Owner

klarsen1 commented Mar 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants