The following three functions are used to calculate the variance of th difference of two RMSTs. `survw_integratef` is used for the integrations; `inside_var` calculates the expression inside the integral; finally, `var_f` computes the variance.
inside_var(t, ascale_r, ascale_nr, tau, bshape, ascale_cens, p)time at which the survival distribution is evaluated
scale parameter for the Weibull distribution for responders
scale parameter for the Weibull distribution for non-responders
follow-up
shape parameter for the Weibull distribution
distributional parameter for the exponential distribution for the censoring
event rate for the response
Variance computation