Package 'BCA1SG'

Title: Block Coordinate Ascent with One-Step Generalized Rosen Algorithm
Description: Implementing the Block Coordinate Ascent with One-Step Generalized Rosen (BCA1SG) algorithm on the semiparametric models for panel count data, interval-censored survival data, and degradation data. A comprehensive description of the BCA1SG algorithm can be found in Wang et al. (2020) <https://github.com/yudongstat/BCA1SG/blob/master/BCA1SG.pdf>. For details of the semiparametric models for panel count data, interval-censored survival data, and degradation data, please see Wellner and Zhang (2007) <doi:10.1214/009053607000000181>, Huang and Wellner (1997) <ISBN:978-0-387-94992-5>, and Wang and Xu (2010) <doi:10.1198/TECH.2009.08197>, respectively.
Authors: Wang Yudong, Ye Zhisheng, and Cao Hongyuan
Maintainer: Wang Yudong <[email protected]>
License: GPL-2
Version: 0.1.0
Built: 2024-10-31 06:21:40 UTC
Source: CRAN

Help Index


A data set adapted from the data set "duser" in the package "FHtest"

Description

Data set of 763 drug users in Badalona (Spain). The data come from the detoxification unit of Hospital Universitari Germans Trias i Pujol in Badalona, Spain. See Gómez et al. (2000) for details.

Usage

data("adapt_duser")

Format

A data frame with 763 observations on the following 4 variables.

left

left endpoint of time to HIV-infection.

right

right endpoint of time to HIV-infectio.n

zgen

gender (0: male; 1: female).

age

patient's age.

Source

The "FHtest" package.

References

Gómez, G., Calle, M. L., Egea, J. M., and Muga, R.(2000). Risk of HIV infection as a function of the duration of intravenous drug use: A non-parametric Bayesian approach. Statistics in Medicine 19(19), 2641–2656.


A data set adapted from the data set "skiTum" in the package "spef"

Description

A data frame containing the recurrence of skin tumors. See Chiou et al. (2017) for details.

Usage

data("adapt_skiTum")

Format

A data frame with 894 observations on the following 7 variables.

id

patient id (repeated for each recurrence).

time

observation time.

count

cumulative number of tumors till the current observation time.

age

patient's age at enrollment; age = 1 if greater than 65, age = 0 otherwise.

male

gender; male = 1, female = 0.

dfmo

treatment (DFMO) group = 1; placebo = 0.

priorTumor

number of prior tumor from diagnosis to randomization.

Source

The "spef" package.

References

Chiou S. H., Xu G., Yan J., and Huang C.(2018). Semiparametric Estimation of the Accelerated Mean Model with Panel Count Data under Informative Examination Times. Biometrics, 74(3), 944-953.


BCA1SG algorithm for degradation data

Description

This function implements the BCA1SG algorithm on the semiparametric random-effects inverse Gaussian process model for degradation data to solve the ML estimates of the model parameters.

Usage

BCA1SG_degradation(input_data, initial_delta, initial_r, initial_Lambda = function(x){x},
threshold = 1e-05, max_iter = 5000, max_stepsize = 1e+05, xi = 0.3, contraction = 0.5)

Arguments

input_data

An object of class data.frame. The structure of the data frame must be {subject ID, time of measurement, measurement}.. This data frame cannot contain missing values. See the dataset "liner" for an example.

initial_delta

The initial value of the shape parameter of the gamma distributed scale parameter in the random-effects inverse Gaussian process. See Wang and Xu (2010) for details.

initial_r

The initial value of the rate parameter of the gamma distributed scale parameter in the random-effects inverse Gaussian process. See Wang and Xu (2010) for details.

initial_Lambda

An R function which serves as the initial value of the baseline mean function.

threshold

Convergence threshold. The algorithm is terminated when the infinity norm of the difference between successive iterates is less than the convergence threshold.

max_iter

Maximum number of iterations allowed.

max_stepsize

Maximum stepsize allowed.

xi

The xi parameter in the inexact backtracking line search algorithm. See Wang et al. (2020) for details.

contraction

The contraction parameter in the inexact backtracking line search algorithm. See Wang et al. (2020) for details.

Details

Details about the BCA1SG algorithm can be found in Wang et al. (2020), and the details concerning the semiparametric random-effects inverse Gaussian process model can be found in Section 3 of Wang and Xu (2010).

Value

distinct_time

The set of distinct observation time points.

est_Lambda

The estimated baseline mean function at the set of distinct observation time points.

est_delta

The estimated shape parameter of the gamma distributed scale parameter in the random-effects inverse Gaussian process.

est_r

The estimated rate parameter of the gamma distributed scale parameter in the random-effects inverse Gaussian process.

iteration

The number of iterations.

timecost

The computational time in seconds.

Author(s)

Wang Y., Ye Z., and Cao H.

References

Wang Y., Ye, Z.-S., and Cao, H.(2020). On Computation of Semi-Parametric Maximum Likelihood Estimators with Shape Constraints. Submitted.

Wang X. and Xu, D.(2010). An Inverse Gaussian Process Model for Degradation Data. Technometrics, 52(2), 188-197.

Examples

data(liner)
res<-BCA1SG_degradation(liner, initial_delta = 1, initial_r = 1, threshold = 5e-2)
res$est_delta
res$est_r
res$iteration
res$timecost
plot(res$distinct_time,res$est_Lambda,type="s",lwd=3,xlab="time",ylab="Baseline mean function")

BCA1SG algorithm for interval-censored survival data

Description

This function implements the BCA1SG algorithm on the semiparametric proportional hazard model for interval-censored data to solve the ML estimates of the model parameters.

Usage

BCA1SG_interval_censor(input_data, initial_beta, initial_Lambda = function(x){x},
threshold = 1e-05, max_iter = 5000, max_stepsize = 10000, xi = 0.3, contraction = 0.5)

Arguments

input_data

An object of class data.frame. The structure of the data frame must be {lower bound of the survival time,upper bound of the survival time,covariate_1,...,covariate_p}. This data frame cannot contain missing values. See the dataset "duser" for an example.

initial_beta

The initial value of the regression coefficients. The dimension of this input should comply with the dimension of the covariates.

initial_Lambda

An R function which serves as the initial value of the baseline cumulative hazard function.

threshold

Convergence threshold. The algorithm is terminated when the infinity norm of the difference between successive iterates is less than the convergence threshold.

max_iter

Maximum number of iterations allowed.

max_stepsize

Maximum stepsize allowed.

xi

The xi parameter in the inexact backtracking line search algorithm. See Wang et al. (2020) for details.

contraction

The contraction parameter in the inexact backtracking line search algorithm. See Wang et al. (2020) for details.

Details

Details about the BCA1SG algorithm can be found in Wang et al. (2020), and the details concerning the semiparametric proportional hazard model can be found in Section 4 of Huang and Wellner (1997).

Value

distinct_time

The set of distinct observation time points.

est_Lambda

The estimated baseline cumulative hazard function at the set of distinct observation time points.

est_beta

The estimated regression coefficients.

iteration

The number of iterations.

timecost

The computational time in seconds.

Note

If we directly run this function on the data set "duser", we may get a different result from that presented in Section 6.2 of Wang et al. (2020). This is because the settings about the initial values of the nonparametric baseline cumulative hazard function are different.

Author(s)

Wang Y., Ye Z., and Cao H.

References

Wang Y., Ye, Z.-S., and Cao, H.(2020). On Computation of Semi-Parametric Maximum Likelihood Estimators with Shape Constraints. Submitted.

Huang J. and Wellner, J.A.(1997). Interval-Censored Survival Data: A Review of Recent Progress. Proceedings of the Fifth Seattle Symposium in Biostatistics, 123-169.

Examples

data(adapt_duser)
res<-BCA1SG_interval_censor(adapt_duser, initial_beta = rep(0,2), threshold = 5e-3)
res$est_beta
res$iteration
res$timecost
plot(res$distinct_time,res$est_Lambda,type="s",lwd=3,
xlab="time",ylab="Baseline cumulative hazard function")

BCA1SG algorithm for panel count data

Description

This function implements the BCA1SG algorithm on the semiparametric nonhomogeneous Poisson process model for panel count data to solve the ML estimates of the model parameters.

Usage

BCA1SG_NHPP(input_data, initial_beta, initial_Lambda = function(x){x}, threshold = 1e-05,
            max_iter = 5000, max_stepsize = 10000, xi = 0.3, contraction = 0.5)

Arguments

input_data

An object of class data.frame. The structure of the data frame must be {patient ID, time of measurement, measurement(cumulative counts),covariate_1,...,covariate_p}. This data frame cannot contain missing values. See the dataset "skiTum" for an example.

initial_beta

The initial value of the regression coefficients. The dimension of this input should comply with the dimension of the covariates.

initial_Lambda

An R function which serves as the initial value of the baseline mean cumulative function.

threshold

Convergence threshold. The algorithm is terminated when the infinity norm of the difference between successive iterates is less than the convergence threshold.

max_iter

Maximum number of iterations allowed.

max_stepsize

Maximum stepsize allowed.

xi

The xi parameter in the inexact backtracking line search algorithm. See Wang et al. (2020) for details.

contraction

The contraction parameter in the inexact backtracking line search algorithm. See Wang et al. (2020) for details.

Details

Details about the BCA1SG algorithm can be found in Wang et al. (2020), and the details concerning the semiparametric NHPP model can be found in Wellner and Zhang (2007).

Value

distinct_time

The set of distinct observation time points.

est_Lambda

The estimated baseline mean cumulative function at the set of distinct observation time points.

est_beta

The estimated regression coefficients.

iteration

The number of iterations.

timecost

The computational time in seconds.

Author(s)

Wang Y., Ye Z., and Cao H.

References

Wang Y., Ye, Z.-S., and Cao, H.(2020). On Computation of Semi-Parametric Maximum Likelihood Estimators with Shape Constraints. Submitted.

Wellner J.A. and Zhang Y.(2007). Two Likelihood-Based Semiparametric Estimation Methods for Panel Count Data with Covariates. The Annals of Statistics, 35(5), 2106-2142.

Examples

data(adapt_skiTum)
res<-BCA1SG_NHPP(adapt_skiTum, initial_beta = rep(0,4), threshold = 2e-3)
res$est_beta
res$iteration
res$timecost
plot(res$distinct_time,res$est_Lambda,type="s",lwd=3,
xlab="Time",ylab="Baseline mean cumulative function")

The marine engine cylinder liner data from Giorgio et al. (2012)

Description

The degradation data measured on 32 marine engine cylinder liners from January 1999 to August 2006. See Giorgio et al. (2012) for details.

Usage

data("liner")

Format

A data frame with 64 observations on the following 3 variables.

ID

liner ID.

Timepoints

the time of measurement (in years).

Measurements

the measurement (in mm).

Source

Giorgio M., Guida M., and Pulcini G.(2012). A State-Dependent Wear Model with an Application to Marine Engine Cylinder Liners. Technometrics, 52(2), 172-187.

References

Giorgio M., Guida M., and Pulcini G.(2012). A State-Dependent Wear Model with an Application to Marine Engine Cylinder Liners. Technometrics, 52(2), 172-187.