MMGOR: A Novel Minorize-Maximize Algorithm for the Generalized Odds Rate Model for Clustered Current Status Data
The MMGOR package implements a novel minorize-maximize algorithm to estimate parameters of generalized odds rate (GOR) model with clustered current status data. MMGOR allows any nonnegative r values of GOR model, which covers a wide range of commonly used survival models. The package takes advantage of C++ computational efficiency to reduce the computation time.
Downlowd the compressed file MMGOR_1.0.tar.gz to the working directory and use following command to install it
install.packages("MMGOR_1.0.tar.gz")
There is an example to show how to use this package. First, use following command to simulate data. Data simulating has several dependencies gaussquad, numDeriv, extraDistr, fda, splines2 and nleqslv.
# Load package
library(MMGOR)
set.seed(1)
H=function(t) log(1+t)+t^(3/2)
data=data_for_est(r=0,beta=c(-1),gamma=c(-1),theta=1,n=300,H=H)
This function generates a cohort with 300 subjects, where each subject has up to 8 observations. Both the covariates of subject level and within-subject level are generated from uniform(-1,1) distribution. Users can use their own H function by changing the specific H function form.
Regression parameters can be estimated using the command
result=MM_est(data$Delta,data$X,data$Z,data$n,data$ni,r=data$r,data$C,betadim=dim(data$X[[1]])[2],gammadim=dim(data$Z)[2],knotsnum = 2,order=2)
The output includes the parameters estimates and the corresponding standard errors.
set.seed(1)
H=function(t) log(1+t)+t^(3/2)
data=data_for_est(r=1,beta=c(-1),gamma=c(-1),theta=1,n=300,H=H)
This function generates a cohort with 300 subjects, where each subject has up to 8 observations. Both the covariates of subject level and within-subject level are generated from uniform(-1,1) distribution. Users can use their own H function by changing the specific H function form.
Regression parameters can be estimated using the command
result=MM_est(data$Delta,data$X,data$Z,data$n,data$ni,r=data$r,data$C,betadim=dim(data$X[[1]])[2],gammadim=dim(data$Z)[2],knotsnum = 2,order=2)
The output includes the parameters estimates and the corresponding standard errors.