# How is a frailty model in survival analysis expressed

In some sources 1 one reads that the frailty model expands on the cox proportional hazards model $$h_i(t|x_i)=h_0(t)\exp(\beta x_i)$$ by adding a frailty term $$z$$ like so $$h_i(t|x_i,z_i)=h_0(t)\exp(\beta x_i+z_i)$$

In other sources I see frailty figuring as a factor “acting multiplicatively” 2 on the baseline hazard function $$h_0(t)$$ $$h_i(t|x_i,z_i)=z_ih_0(t)\exp(\beta x_i)$$

How are individual frailty and shared frailty correctly expressed?

These are essentially equivalent, except for a different interpretation of $$z_i$$ in the two representations. For the exponential function,

$$\exp(x+y)=\exp(x) \exp(y) .$$

If you take $$\exp(z_i)$$ from the first representation

$$h_i(t|x_i,z_i)=h_0(t)\exp(\beta x_i+z_i)$$

you get $$z_i$$ in the second representation

$$h_i(t|x_i,z_i)=z_ih_0(t)\exp(\beta x_i).$$

The first representation is used for modeling in common R packages. In the R survival package, the coxph() function can model $$z_i$$ in $$\exp(\beta x_i + z_i)$$ with either a Gaussian, gamma, or t distribution. That's explained in Chapter 9 of Therneau and Grambsch. The coxme package extends what you show as $$z_i$$ in the first representation to more complicated random effects with Gaussian distributions.