Learn R Programming

frailtyMMpen: Package for Penalized Frailty Models

This package implements the MM algorithm for a variety types of frailty models which can handle clustered data, multi-event data and recurrent data in addition to the simple frailty model. Besides, this package can obtain the estimation of parameters for penalized regression using LASSO, MCP and SCAD penalties. Currently supported frailty distributions include gamma, log-normal, inverse gaussian and PVF (1<p<2). The estimation procedure is computationally efficient which makes it also capable for handling high-dimensional data.

Installation

You can install developed version of frailtyMMpen from github with:

# install.packages("devtools")
devtools::install_github("heilokchow/frailtyMMpen")

Example

This is a basic example which shows you how to use this package, you may refer to the package manual for detailed descriptions and examples for each function.

We use the simulated data with 50 clusters and 10 objects in each cluster:

data(simdataCL)

We first run the non-penalized regression with Gamma frailty and obtain the summary statistics and the plot of conditional baseline hazard.

gam_cl = frailtyMM(Surv(time, status) ~ . + cluster(id), simdataCL, frailty = "gamma")

summary(gam_cl)

plot(gam_cl)

Then, we perform the penalized regression with Gamma frailty and LASSO penalty and obtain BIC, degree of freedom under a sequence of tuning parameters and the plot of regularization path.

gam_cl_pen = frailtyMMpen(Surv(time, status) ~ . + cluster(id), simdataCL, frailty = "gamma")

print(gam_cl_pen)

plot(gam_cl_pen)

Copy Link

Version

Install

install.packages('frailtyMMpen')

Monthly Downloads

258

Version

1.2.1

License

GPL (>= 2)

Maintainer

Yunpeng Zhou

Last Published

August 8th, 2023

Functions in frailtyMMpen (1.2.1)

frailtyMMpen

Fitting penalized frailty models with clustered, multi-event and recurrent data using MM algorithm
coef.fpen

retrieve the coefficients under given tuning parameter
predict.fmm

Estimate the baseline hazard or the predict hazard rate based on the new data for non-penalized regression
cluster

cluster function
hdCLdata

Simulated High-dimensional Clustered data
plot.fmm

Plot the baseline hazard or the predicted hazard based on the new data
plot.fpen

Plot the regularization path
simdataCL

Simulated Clustered data
predict.fpen

Estimate the baseline hazard or the predict hazard rate based on the new data for penalized regression
event

event function
frailtyMM

Fitting frailty models with clustered, multi-event and recurrent data using MM algorithm
print.fmm

print a non-penalized regression object
print.fpen

print a penalized regression object
simdataME

Simulated Multiple Event data
simdataRE

Simulated Recurrent Event data
summary.fmm

Provide the summary for the model fitting