Frailty Models for Death Rate I need to create a frailty-model (gompertz-gamma) for deathratesdue heterogeneity, having a dataset of people grouped by age and year of calendary with the following variables:
year, age , deaths, exposure
I have seen the R-Package "Parfm" , but the model requires a dependant variable:
Surv(time,event)
In the best scenario, is there a way to create this kind of model using GLM?
Is it possible to use the parfm model for deathrates? If possible, how can I re-write my dataset to make it ready for "Parfm" model?
If not possible, considering my low competences in R, is there another way to procede?
 A: Not sure why this was migrated from SO, but here goes:
Surv(time, event) is used just as written, only time should be the name of the column in your dataset that stores survival times, and event should be an indicator column telling whether the individual died at that time, or was censored. See ?Surv for more details.
Also, I am not sure if your dataset is in long format now, i.e. one row per individual? You can use the example dataset veteran in R to see how it should look, and to try calling survival tests:
> head(veteran)
  trt celltype time status karno diagtime age prior
1   1 squamous   72      1    60        7  69     0
2   1 squamous  411      1    70        5  64    10
3   1 squamous  228      1    60        3  38     0
4   1 squamous  126      1    60        9  63    10
5   1 squamous  118      1    70       11  65    10
6   1 squamous   10      1    20        5  49     0

The formula for a survival model on this dataset could be something like Surv(time, status) ~ celltype + trt.
