Exercises for Mon Sept 3

Mon Aug 27 I discussed various matters from Chs 1, 2, and I used a bit of time to go through the Nils Exercise 1 on Old Egypt. Topics included hazard rate modelling, the empirical survival function, fitting of parametric models using maximum likelihood (ML), programming the log-likelihood function -- and then the eternal golden quadruple: counting process, at-risk-process, intensity process, martingale.

I've uploaded the R script com12a, which does various things for the Old Egypt dataset, including parametric ML fitting to the gamma and Weibull distributions. Do source("com12a") to run all of it, but also study its parts, and be ready to edit, to copy, to amend, to fix.

Next week I start Ch 3, with the Nelson-Aalen and Kaplan-Meier estimators etc.

I'm in the process of writing up a couple of exercises for the Nils Exercises collection. One of these is for next Monday, where the essence is as follows. Go to the data for the course and download "iud-data", with data on iud use for 100 women. Concentrate on *time to expulsion* (coded as "2" in the third column of the dataset). Fit two models, and check which might be best: First model 0, which is expo(theta), a constant rate. Then model 1, which acts as follows: each woman has a constant theta, but these are distributed as a Gamma(a,b) in the population of iud users. Find expressions for the cumulative hazard A(t), the survival S(t), the hazard rate alpha(t), the density f(t). Find the log-likelihood function \ell_n(a,b), and find the maximiser.

Also, do Exercises 1, 2, 3, 4, 5, 6 from ABG Ch 1.

Published Aug. 28, 2018 9:44 PM - Last modified Aug. 28, 2018 10:28 PM