[R] time series transformation....
dear members, I have a heteroscedastic time series which I want to transform to make it homoscedastic by a box cox transformation. I am using Otexts by RJ hyndman and George Athanopolous as my textbook. They discuss transformation and also say the fpp3 and the fable package automatically back transforms the point forecast. they also discuss the process which I find to be very cumbersome. Is there any R package which automatically back transforms the point forecast when I use xts objects ( RJH and GA use tsibble objects) with arfima/arima in the forecast package? THanking you, Yours sincerely, AKSHAY M KULKARNI [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] geom_smooth
Colleagues, Your suggestions are elegant and greatly appreciated. Thomas Subia On Friday, August 11, 2023 at 11:08:42 PM PDT, Berwin A Turlach wrote: G'day Thomas, On Sat, 12 Aug 2023 04:17:42 + (UTC) Thomas Subia via R-help wrote: > Here is my reproducible code for a graph using geom_smooth The call "library(tidyverse)" was missing. :) > I'd like to add a black boundary around the shaded area. I suspect > this can be done with geom_ribbon but I cannot figure this out. Some > advice would be welcome. This works for me: ggplot(scatter_data,aes(x=x_var,y=y_var,))+ geom_point()+ geom_smooth(se=TRUE,fill="blue",color="black",linetype="dashed") + geom_ribbon(stat="smooth", aes(ymin=after_stat(ymin), ymax=after_stat(ymax)), fill=NA, color="black")+ theme_cowplot() Cheers, Berwin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] time series transformation....
Hi Akshay, The forecast package will do the BoxCox transform and automatically backtransform the forecasts. The package also handles xts objects. For example, modifying the example from the help page of forecast::forecast for Arima > dt <- as.Date("2023-01-01") + 1:length(WWWusage) > a <- xts(WWWusage, order.by=dt) > fit1 <- Arima(a, c(3,1,0)) > fit2 <- Arima(a, lambda=0.5, c(3,1,0)) ## applies the Box-Cox transform with > lambda=0.5 > par(mfrow=c(1,2)) > plot(forecast(fit1)) > plot(forecast(fit2)) HTH, Eric p.s. RJH is the author/maintainer of the forecast package On Sun, Aug 13, 2023 at 1:01 AM akshay kulkarni wrote: > > dear members, > I have a heteroscedastic time series which I want to > transform to make it homoscedastic by a box cox transformation. I am using > Otexts by RJ hyndman and George Athanopolous as my textbook. They discuss > transformation and also say the fpp3 and the fable package automatically back > transforms the point forecast. they also discuss the process which I find to > be very cumbersome. Is there any R package which automatically back > transforms the point forecast when I use xts objects ( RJH and GA use tsibble > objects) with arfima/arima in the forecast package? > > THanking you, > Yours sincerely, > AKSHAY M KULKARNI > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.