Here is a dataset I have:
simulate_year_data <- function(year) { seasonal_pattern <- sin(2 * pi * (1:12) / 12) * 15 + 40 trend <- year * 2 rainfall <- seasonal_pattern + trend + rnorm(12, 0, 10) rainfall <- pmax(rainfall, 0) cumulative_percent <- cumsum(rainfall) / sum(rainfall) data.frame(year = year, month = 1:12, rainfall = rainfall, cumulative_percent = cumulative_percent) } data_list <- lapply(1:10, simulate_year_data) final_data <- do.call(rbind, data_list) I specifically want to make a model which can forecast the cumulative_percent variable each month for the next 2 years. This model should obey the following properties as this is cumulative:
- For any month, the forecast can only be between 0 and 1
- The forecasts in all months should sum to 1
- In a given year, the forecast for each month should be greater than the previous month
I could have just taken the overall averages and assume that the future will also have these same values:
monthly_averages <- final_data %>% group_by(month) %>% summarise(avg_cumulative_percent = mean(cumulative_percent)) But this will result in all future years having the exact same predictions. I want something which looks at trends, ex: in recent years, the year's total data is occurring in shorter time periods.
Are there some regression models suitable for this task?

lm(rainfall ~ year + as.factor(month), data=final_data)you would have something to project forward and come close to capturing the trend as well as an approximation of the seasonal pattern. $\endgroup$