Closed DongHarry-Kang closed 5 months ago
In your 1st plot, what's the x axis? the onepager plot for weibull adstock has cut the x-axis shorter for better readability, see here.
Hi @gufengzhou , I realized as long as I set the x-axis as the same # of timepoints as my sample, I can get the same results. I will close this issue
I am recently trying to identify the peak value of Weibull PDF adstock for my Robyn result such as below. Could somebody share the code how to obtain the time point that each curve becomes peak? looping in @gufengzhou for your opinion. thanks!
I tried the below code to recreate, but the I noticed the time point shifted to the left. (I tried to recreate #1 graph). could somebody tell me how to do this correctly? library(Robyn) library(ggplot2)
install.packages("data.table") library(data.table) x = rep(1, 150) wb_out <- adstock_weibull(x=x, shape = 5.8148618518, scale = 0.0919861, type = "pdf") dt_plot <- data.table(ds = 1:150, x_accum_decay = wb_out$thetaVecCum) ggplot(dt_plot, aes(x=ds, y=x_accum_decay)) + geom_line()