UPDATE: 2022-11-23 08:43:09
ここではSaaSの記事でよく見かける解約率とユーザー数の関係図を可視化する。例えば下記の記事のグラフで、他の記事でも沢山見かけるものの、計算仮定が書かれていないので、計算して可視化してみた。
解約率が成長上限が決まるという関係は、グラフを見れば明らかで、持続的に成長できるのは、解約率が1桁のときのみとわかる。下記はシミュレーション設定。
library(tidyverse)
<- function(t, rate, new){
sim_churn <- vector(mode = "numeric", length = t)
y 1]] <- new
y[[for (i in 2:t) {
<- new + (y[[i-1]] - (y[[i-1]]*rate))
y[[i]]
}return(y)
}
<- 36
t <- c(0.03, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30)
rate map_dfc(
.x = rate,
.f = function(x){sim_churn(t = t, rate = x, new = 100)}
%>%
) bind_cols(1:t) %>%
setNames(c(paste0("ChurnRate=", rate), "time")) %>%
pivot_longer(cols = -time, names_to = "rate_type", values_to = "y") %>%
arrange(rate_type, time) %>%
ggplot(., aes(time, y, col = rate_type)) +
geom_line(size = 1) +
scale_x_continuous(breaks = 1:t) +
scale_y_continuous(breaks = seq(0, 5000, 250)) +
theme_bw()