`R/cumulative-effect.R`

, `R/viz-elra.R`

`get_cumu_eff.Rd`

Calculate (or plot) cumulative effect for all time-points of the follow-up

get_cumu_eff(data, model, term, z1, z2 = NULL, se_mult = 2) gg_cumu_eff(data, model, term, z1, z2 = NULL, se_mult = 2, ci = TRUE)

data | Data used to fit the |
---|---|

model | A suitable model object which will be used to estimate the
partial effect of |

term | A character string indicating the model term for which partial effects should be plotted. |

z1 | The exposure profile for which to calculate the cumulative effect. Can be either a single number or a vector of same length as unique observation time points. |

z2 | If provided, calculated cumulative effect is for the difference between the two exposure profiles (g(z1,t)-g(z2,t)). |

se_mult | Multiplicative factor used to calculate confidence intervals (e.g., lower = fit - 2*se). |

ci | Logical. Indicates if confidence intervals for the |