```
# NOT RUN {
# List of distributions available
names(survreg.distributions)
# }
# NOT RUN {
[1] "extreme" "logistic" "gaussian" "weibull" "exponential"
[6] "rayleigh" "loggaussian" "lognormal" "loglogistic" "t"
# }
# NOT RUN {
# Compare results
all.equal(dsurvreg(1:10, 2, 5, dist='lognormal'), dlnorm(1:10, 2, 5))
# Hazard function for a Weibull distribution
x <- seq(.1, 3, length=30)
haz <- dsurvreg(x, 2, 3)/ (1-psurvreg(x, 2, 3))
# }
# NOT RUN {
plot(x, haz, log='xy', ylab="Hazard") #line with slope (1/scale -1)
# }
```

Run the code above in your browser using DataLab