#ej del libro
weibSurv<-function(t,shape,scale) pweibull(t, shape=shape, scale = scale, lower.tail = F)
curve(weibSurv(x,shape=1.5, scale=1/0.03), from=0, to=80, ylim=c(0,1), ylab='Survival probability', xlab='Time')

weibHaz<- function(x,shape, scale) dweibull(x,shape=shape, scale=scale)/pweibull(x,shape=shape, scale=scale, lower.tail=F)
{par(mfrow=c(1,3))
curve(weibHaz(x,shape=1.5, scale=1/0.03),from=0, to=80, ylab='Hazard', xlab='Time', col="red")
curve(weibHaz(x,shape=1, scale=1/0.03),from=0, to=80, ylab='Hazard', xlab='Time', col="blue")
curve(weibHaz(x,shape=0.75, scale=1/0.03),from=0, to=80, ylab='Hazard', xlab='Time', col="orange")}

$$
\[\begin{array}{ccccc}
T \sim & ParĂ¡metros & f(t) & S(t) & h(t) \\
Log-norm(\mu,\sigma^2) & \mu \in R, \sigma^2>0, t \geq 0 & \frac{1}{\sqrt{2\pi\sigma^2}t} exp\{-\frac{(log(t)-\mu)^2}{2\sigma^2}\} & 1-\Phi\Big(\frac{log(t)-\mu}{\sigma}\Big) & \frac{\Big(\frac{1}{\sqrt{2\pi\sigma^2}t} exp\{-\frac{(log(t)-\mu)^2}{2\sigma^2}\} \Big)}{1-\Phi\big(\frac{log(t)-\mu}{\sigma}\big)}\\
Gamma(k, \lambda)& k,\lambda, t>0 & \frac{\lambda^kt^{k-1}e^{-\lambda t}}{\Gamma(k)} & 1-GI(k,\lambda t) & \frac{\Big(\frac{\lambda^kt^{k-1}e^{-\lambda t}}{\Gamma(k)}\Big)}{1-GI(k,\lambda t)}\\
Weibull(\alpha, \lambda)& \alpha,\lambda, t>0 & \lambda \alpha(\lambda t)^{\alpha-1}e^{-(\lambda t)^\alpha} & e^{-(\lambda t)^\alpha} & \alpha \lambda(\lambda t)^{\alpha-1}
\end{array}\]
$$