## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----setup-------------------------------------------------------------------- library(FrailtyCompRisk) ## ----------------------------------------------------------------------------- set.seed(123) n_cov = 2 n_per_cluster = 15 n_cluster = 20 n = n_cluster * n_per_cluster G = rep(1:n_cluster, each = n_per_cluster) Z = matrix(rnorm(n*n_cov,0,1),ncol = n_cov) df = simulate_data(G,Z,prop = 0.6,beta = c(1,1.2),theta = 0.6,cens = TRUE) #Estimate using REML with frailty res <- Reml_CompRisk_frailty(df) #Print estimated coefficients res$beta res$theta