Introduction: All R scripts used for reproducing the real data analysis of DRS data #################################################################### Data: DRS.csv Data Description: The 197 patients in this dataset were a 50% random sample of the patients with "high-risk" diabetic retinopathy as defined by the Diabetic Retinopathy Study (DRS). Each patient had one eye randomized to laser treatment and the other eye received no treatment. For each eye, the event of interest was the time from initiation of treatment to the time when visual acuity dropped below 5/200 two visits in a row (call it "blindness"). Thus there is a built-in lag time of approximately 6 months (visits were every 3 months). Survival times in this dataset are therefore the actual time to blindness in months, minus the minimum possible time to event (6.5 months). Censoring was caused by death, dropout, or end of the study. Subject id laser type: 1=xenon, 2=argon treated eye: 1=right 2=left age at diagnosis of diabetes type of diabetes: 1= juvenile (age at dx < 20), 2/0=adult Outcome for the treated eye: risk group: 6-12 status: 0=censored, 1=blindness follow-up time Outcome for the untreated eye risk group: 6-12 status: 0=censored, 1=blindness follow-up time The risk group variable was used to define the 'high risk' samples. #################################################################### Used variables: treated eye, age at diagnosis, outcome for treated eye, outcome of untreated eye #################################################################### Code: DRS_part1.R Implements Naive Importance Sampling and produces naive estimate of phi and other parameters. #################################################################### Code: DRS_part2.R Implements Generalized Importance Sampling procedure to produce final phi estimate and consequently estimates other marginal parameters. Also implements Reverse Logistic Regression procedure (Geyer, 1994) to produce estimates of r_i hats. ################################################################### R script: DRS_pdf.R Defines clayton copula and its derivative functions, density and survival functions of GEV, complete data log likelihood and two other wrapper functions for likelihood. ################################################################### R script: DRS_priors.R Defines a function which returns appropriate prior distributions for each parameter for MCMC #################################################################### R script: DRS_MH_functions.R Defines a function which returns appropriate bounds for each concerned parameter under the conditions defined in Section 5.3. Defines the M-H algorithm and produces posterior samples. #################################################################### R script: DRS_estfns.R Defines the B_phi_phi1 functions for both naive and generalized importance sampling techniques as defined in Section 4 and 4.1 of our chapter. Also defines the eta function for estimating r_i hats in Reverse Logistic Regression procedure. #####################################################################