For Weibull distribution, S(t) = $e^{-(\lambda * e^(x * \beta)*t)^\rho}$ "$^{(1/rho)}$" will be only for log(v) so, I modified like this Tlat <- - log(v)^(1 / rho) / (lambda * exp(x * beta)) if rho = 1, result will be same.