Generating data from improper distributions : application to Cox proportional hazards models with cure