Learn R Programming

brms (version 0.9.1)

kidney: Infections in kidney patients

Description

This dataset, originally discussed in McGilchrist and Aisbett (1991), describes the first and second (possibly right censored) recurrence time of infection in kideny patients using portable dialysis equipment. In addition, information on the risk variables age, sex and disease type is provided.

Usage

kidney

Arguments

source

McGilchrist, C. A., & Aisbett, C. W. (1991). Regression with frailty in survival analysis. Biometrics, 47(2), 461-466.

Examples

Run this code
## performing surivival analysis using the "weibull" family
fit1 <- brm(time | cens(censored) ~ age + sex + disease, 
            data = kidney, family = weibull, inits = "0")
summary(fit1) 
plot(fit1)

## adding random intercepts over patients
fit2 <- brm(time | cens(censored) ~ age + sex + disease + (1|patient), 
            data = kidney, family = weibull(), inits = "0",
            prior = set_prior("cauchy(0,2)", class = "sd"))
summary(fit2) 
plot(fit2)

Run the code above in your browser using DataLab