Title: | Semiparametric Competing Risks Regression under Interval Censoring |
---|---|
Description: | Semiparametric regression models on the cumulative incidence function for interval-censored competing risks data as described in Bakoyannis, Yu, & Yiannoutsos (2017) /doi{10.1002/sim.7350} and the models with missing event types as described in Park, Bakoyannis, Zhang, & Yiannoutsos (2021) \doi{10.1093/biostatistics/kxaa052}. The proportional subdistribution hazards model (Fine-Gray model), the proportional odds model, and other models that belong to the class of semiparametric generalized odds rate transformation models. |
Authors: | Giorgos Bakoyannis <[email protected]>, Jun Park <[email protected]> |
Maintainer: | Jun Park <[email protected]> |
License: | GPL (>= 2) |
Version: | 3.0.4 |
Built: | 2024-12-21 06:42:41 UTC |
Source: | CRAN |
Generates the derivative of the B-splines basis matrix.
bs.derivs( x, derivs = 0, df = NULL, knots = NULL, degree = 3, intercept = FALSE, Boundary.knots = range(x) )
bs.derivs( x, derivs = 0, df = NULL, knots = NULL, degree = 3, intercept = FALSE, Boundary.knots = range(x) )
x |
object of B-splines |
derivs |
a number of derivatives |
df |
degrees of freedom of B-splines |
knots |
a vector of internal knots |
degree |
degrees of B-splines |
intercept |
a logical vector |
Boundary.knots |
a vector of boundary knots |
The function bs.derivs
performs derivatives of B-splines
The function bs.derivs
returns a component:
resmat |
derivatives of B-spline |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Routine that performs B-spline sieve maximum likelihood estimation with linear and nonlinear inequality/equality constraints
bssmle(formula, data, alpha, k = 1)
bssmle(formula, data, alpha, k = 1)
formula |
a formula object relating survival object |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
The function bssmle
performs B-spline sieve maximum likelihood estimation.
The function bssmle
returns a list of components:
beta |
a vector of the estimated coefficients for the B-splines |
varnames |
a vector containing variable names |
alpha |
a vector of the link function parameters |
loglikelihood |
a loglikelihood of the fitted model |
convergence |
an indicator of convegence |
tms |
a vector of the minimum and maximum observation times |
Z |
a set of covariates |
Tv |
a vector of |
Tu |
a vector of |
Bv |
a list containing the B-splines basis functions evaluated at |
Bu |
a list containing the B-splines basis functions evaluated at |
dBv |
a list containing the first derivative of the B-splines basis functions evaluated at |
dBu |
a list containing the first derivative of the B-splines basis functions evaluated at |
dmat |
a matrix of event indicator functions |
Giorgos Bakoyannis, [email protected]
Jun Park, [email protected]
Routine that performs B-spline sieve maximum likelihood estimation with linear and nonlinear inequality and equality constraints
bssmle_aipw(formula, aux, data, alpha, k)
bssmle_aipw(formula, aux, data, alpha, k)
formula |
a formula object relating survival object |
aux |
auxiliary variables that may be associated with the missingness and the outcome of interest |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
The function bssmle_aipw
performs B-spline sieve maximum likelihood estimation.
The function bssmle_aipw
returns a list of components:
beta |
a vector of the estimated coefficients for the B-splines |
varnames |
a vector containing variable names |
varnames.aux |
a vector containing auxiliary variable names |
alpha |
a vector of the link function parameters |
loglikelihood |
a loglikelihood of the fitted model |
convergence |
an indicator of convegence |
tms |
a vector of the minimum and maximum observation times |
Bv |
a list containing the B-splines basis functions evaluated at |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Performs the least-squares methods to estimate the information matrix for the estimated regression coefficients
bssmle_lse(obj)
bssmle_lse(obj)
obj |
a list of objectives from |
The function bssmle_lse
estimates the information matrix for the estimated regression coefficients from the function bssmle
using the lease-squares method.
The function bssmle_lse
returns a list of components:
Sigma |
the estimated variance-covariance matrix for the estimated regression coefficients |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Zhang, Y., Hua, L., and Huang, J. (2010), A spline-based semiparametric maximum likelihood estimation method for the Cox model with interval-censoed data. Scandinavian Journal of Statistics, 37:338-354.
Performs the least-squares methods to estimate the information matrix for the estimated regression coefficients
bssmle_lse_lt(obj)
bssmle_lse_lt(obj)
obj |
a list of objectives from |
The function bssmle_lse_lt
estimates the information matrix for the estimated regression coefficients from the function bssmle_lt
using the lease-squares method.
The function bssmle_lse_lt
returns a list of components:
Sigma |
the estimated information matrix for the estimated regression coefficients |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Zhang, Y., Hua, L., and Huang, J. (2010), A spline-based semiparametric maximum likelihood estimation method for the Cox model with interval-censoed data. Scandinavian Journal of Statistics, 37:338-354.
Routine that performs B-spline sieve maximum likelihood estimation with linear and nonlinear inequality/equality constraints
bssmle_lt(formula, data, alpha, k = 1)
bssmle_lt(formula, data, alpha, k = 1)
formula |
a formula object relating survival object |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
The function bssmle_lt
performs B-spline sieve maximum likelihood estimation for left-truncated and interval-censored competing risks data.
The function bssmle_lt
returns a list of components:
beta |
a vector of the estimated coefficients |
varnames |
a vector containing variable names |
alpha |
a vector of the link function parameters |
loglikelihood |
a loglikelihood of the fitted model |
convergence |
an indicator of convegence |
tms |
a vector of the minimum and maximum observation times |
Z |
a design matrix |
Tw |
a vector of |
Tv |
a vector of |
Tu |
a vector of |
Bw |
a list containing the B-splines basis functions evaluated at |
Bv |
a list containing the B-splines basis functions evaluated at |
Bu |
a list containing the B-splines basis functions evaluated at |
dBw |
a list containing the first derivative of the B-splines basis functions evaluated at |
dBv |
a list containing the first derivative of the B-splines basis functions evaluated at |
dBu |
a list containing the first derivative of the B-splines basis functions evaluated at |
dmat |
a matrix of event indicator functions |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Bootstrap varince estimation for the estimated regression coefficients
bssmle_se(formula, data, alpha, k = 1, do.par, nboot, objfun)
bssmle_se(formula, data, alpha, k = 1, do.par, nboot, objfun)
formula |
a formula object relating survival object |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
do.par |
using parallel computing for bootstrap calculation. If |
nboot |
a number of bootstrap samples for estimating variances and covariances of the estimated regression coefficients. If |
objfun |
an option to select estimating function |
The function bssmle_se
estimates bootstrap standard errors for the estimated regression coefficients from the function bssmle
, bssmle_lt
, ro bssmle_ltir
.
The function bssmle_se
returns a list of components:
notconverged |
a list of number of bootstrap samples that did not converge |
numboot |
a number of bootstrap converged |
Sigma |
an estimated bootstrap variance-covariance matrix of the estimated regression coefficients |
Giorgos Bakoyannis, [email protected]
Jun Park, [email protected]
Bootstrap varince estimation for the estimated regression coefficients
bssmle_se_aipw(formula, aux, data, alpha, k, do.par, nboot, w.cores = NULL)
bssmle_se_aipw(formula, aux, data, alpha, k, do.par, nboot, w.cores = NULL)
formula |
a formula object relating survival object |
aux |
auxiliary variables that may be associated with the missingness and the outcome of interest |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
do.par |
using parallel computing for bootstrap calculation. If |
nboot |
a number of bootstrap samples for estimating variances and covariances of the estimated regression coefficients. If |
w.cores |
a number of cores that are assigned (the default is |
The function bssmle_aipw_se
estimates bootstrap standard errors for the estimated regression coefficients from the function bssmle
.
The function bssmle_aipw_se
returns a list of components:
notconverged |
a list of number of bootstrap samples that did not converge |
numboot |
a number of bootstrap converged |
Sigma |
an estimated bootstrap variance-covariance matrix of the estimated regression coefficients |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
The function ciregic
performs semiparametric regression on cumulative incidence function with interval-censored competing risks data. It fits the proportional subdistribution hazards model (Fine-Gray model), the proportional odds model, and other models that belong to the class of semiparametric generalized odds rate transformation models. The standard errors for the estimated regression coefficients are estimated by a choice of options: 1) the bootstrapping method or 2) the least-squares method.
ciregic(formula, data, alpha, k = 1, do.par, nboot, ...)
ciregic(formula, data, alpha, k = 1, do.par, nboot, ...)
formula |
a formula object relating the survival object |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
do.par |
an option to use parallel computing for bootstrap. If |
nboot |
a number of bootstrap samples for estimating variances and covariances of the estimated regression coefficients. If |
... |
further arguments |
The formula for the model has the form of response ~ predictors
. The response in the formula is a Surv2(v, u, event)
object where v
is the last observation time prior to the failure, u
is the first observation time after the failure, and event
is the event or censoring indicator. event
should include 0, 1 or 2, denoting right-censoring, failure from cause 1 and failure from cause 2, respectively. If event=0
(i.e. right-censored observation) then u
is not included in any calculation as it corresponds to . The user can provide any value in
u
for the right-censored cases, even NA
. The function ciregic
fits models that belong to the class of generalized odds rate transformation models which includes the proportional subdistribution hazards or the Fine-Gray model and the proportional odds model. The parameter defines the link function/model to be fitted for cause of failure 1 and 2, respectively. A value of
0
corresponds to the Fine-Gray model and a value of 1
corresponds to the proportional odds model. For example, if then the function
ciregic
fits the Fine-Gray model for cause 1 and the proportional odds model for cause 2.
The function ciregic
provides an object of class ciregic
with components:
varnames |
a vector containing variable names |
coefficients |
a vector of the regression coefficient estimates |
gamma |
a vector of the estimated coefficients for the B-splines |
vcov |
a variance-covariance matrix of the estimated regression coefficients |
alpha |
a vector of the link function parameters |
loglikelihood |
a loglikelihood of the fitted model |
convergence |
an indicator of convegence |
tms |
a vector of the minimum and maximum observation times |
Bv |
a list containing the B-splines basis functions evaluated at |
numboot |
a number of converged bootstrap |
notconverged |
a list of number of bootstrap samples that did not converge |
call |
a matched call |
Giorgos Bakoyannis, [email protected]
Jun Park, [email protected]
Bakoyannis, G., Yu, M., and Yiannoutsos C. T. (2017). Semiparametric regression on cumulative incidence function with interval-censored competing risks data. Statistics in Medicine, 36:3683-3707.
Fine, J. P. and Gray, R. J. (1999). A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association, 94:496-509.
summary.ciregic
for the summarized results and predict.ciregic
for value of the predicted cumulative incidence functions. coef
and vcov
are the generic functions. dataprep
for reshaping data from a long format to a suitable format to be used in the function ciregic
.
## Not run: ## Set seed in order to have reproducibility of the bootstrap standard error estimate set.seed(1234) ## Reshaping data from a long format to a suitable format newdata <- dataprep(data = longdata, ID = id, time = t, event = c, Z = c(z1, z2)) ## Estimation of regression parameters only. No bootstrap variance estimation. ## with 'newdata' fit <- ciregic(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 0, do.par = FALSE) fit ## Bootstrap variance estimation based on 50 replications fit <- ciregic(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 50, do.par = FALSE) ## End(Not run) ## Note that the user can use parallel computing to decrease ## the computation time of the bootstrap variance-covariance ## estimation (e.g. nboot = 50) ## Summarize semiparametric regression model summary(fit) ## Predict and draw plot the cumulative incidence function evaluated at z1 = 1 and z2 = 0.5 t <- seq(from = 0, to = 2.8, by = 2.8 / 99) pred <- predict(object = fit, covp = c(1, 0.5), times = t) pred plot(pred$t, pred$cif1, type = "l", ylim = c(0, 1)) points(pred$t, pred$cif2, type = "l", col = 2)
## Not run: ## Set seed in order to have reproducibility of the bootstrap standard error estimate set.seed(1234) ## Reshaping data from a long format to a suitable format newdata <- dataprep(data = longdata, ID = id, time = t, event = c, Z = c(z1, z2)) ## Estimation of regression parameters only. No bootstrap variance estimation. ## with 'newdata' fit <- ciregic(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 0, do.par = FALSE) fit ## Bootstrap variance estimation based on 50 replications fit <- ciregic(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 50, do.par = FALSE) ## End(Not run) ## Note that the user can use parallel computing to decrease ## the computation time of the bootstrap variance-covariance ## estimation (e.g. nboot = 50) ## Summarize semiparametric regression model summary(fit) ## Predict and draw plot the cumulative incidence function evaluated at z1 = 1 and z2 = 0.5 t <- seq(from = 0, to = 2.8, by = 2.8 / 99) pred <- predict(object = fit, covp = c(1, 0.5), times = t) pred plot(pred$t, pred$cif1, type = "l", ylim = c(0, 1)) points(pred$t, pred$cif2, type = "l", col = 2)
The function ciregic_aipw
performs semiparametric regression on cumulative incidence function with interval-censored competing risks data in the presence of missing cause of failure. It fits the proportional subdistribution hazards model (Fine-Gray model), the proportional odds model, and other models that belong to the class of semiparametric generalized odds rate transformation models. The estimates have double robustness property, which means that the estimators are consistent even if either the model for the probability of missingness or the model for the probability of the cause of failure is misspecified under the missing at random assumption.
ciregic_aipw( formula, aux = NULL, data, alpha, k = 1, do.par, nboot, w.cores = NULL, ... )
ciregic_aipw( formula, aux = NULL, data, alpha, k = 1, do.par, nboot, w.cores = NULL, ... )
formula |
a formula object relating the survival object |
aux |
auxiliary variable(s) that may be associated with the missingness and the outcome of interest |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
do.par |
an option to use parallel computing for bootstrap. If |
nboot |
a number of bootstrap samples for estimating variances and covariances of the estimated regression coefficients. If |
w.cores |
a number of cores that are assigned (the default is |
... |
further arguments |
The formula for the model has the form of response ~ predictors
. The response in the formula is a Surv2(v, u, event)
object where v
is the last observation time prior to the event, u
is the first observation time after the event, and event
is the event or censoring indicator. event
should include 0, 1 or 2, denoting right-censoring, event type 1 and 2, respectively. If event=0
(i.e. right-censored observation) then u
is not included in any calculation as it corresponds to . The user can provide any value in
u
for the right-censored cases, even NA
. The function ciregic_aipw
fits models that belong to the class of generalized odds rate transformation models which includes the proportional subdistribution hazards or the Fine-Gray model and the proportional odds model. The parameter defines the link function/model to be fitted for event 1 and 2, respectively. A value of
0
corresponds to the Fine-Gray model and a value of 1
corresponds to the proportional odds model. For example, if then the function
ciregic_aipw
fits the Fine-Gray model for the event type 1 and the proportional odds model for the event type 2.
The function ciregic_aipw
provides an object of class ciregic_aipw
with components:
varnames |
a vector containing variable names |
varnames.aux |
a vector containing auxiliary variable names |
coefficients |
a vector of the regression coefficient estimates |
gamma |
a vector of the estimated coefficients for the B-splines |
vcov |
a variance-covariance matrix of the estimated regression coefficients |
alpha |
a vector of the link function parameters |
loglikelihood |
a loglikelihood of the fitted model |
convergence |
an indicator of convegence |
tms |
a vector of the minimum and maximum observation times |
Bv |
a list containing the B-splines basis functions evaluated at |
numboot |
a number of converged bootstrap |
notconverged |
a list of number of bootstrap samples that did not converge |
call |
a matched call |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Bakoyannis, G., Yu, M., and Yiannoutsos C. T. (2017). Semiparametric regression on cumulative incidence function with interval-censored competing risks data. Statistics in Medicine, 36:3683-3707.
Fine, J. P. and Gray, R. J. (1999). A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association, 94:496-509.
summary.ciregic_aipw
for the summarized results and predict.ciregic_aipw
for value of the predicted cumulative incidence functions. coef
and vcov
are the generic functions. dataprep function for reshaping data from a long format to a suitable format to be used in the function ciregic_aipw
.
## Not run: ## Set seed in order to have reproducibility of the bootstrap standard error estimate set.seed(1234) ## Estimation of regression parameters only. No bootstrap variance estimation. ## with 'simdata_aipw' data(simdata_aipw) fit_aipw <- ciregic_aipw(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, aux = a, data = simdata_aipw, alpha = c(1, 1), nboot = 0, do.par = FALSE) fit_aipw ## Bootstrap variance estimation based on 50 replications fit_aipw <- ciregic_aipw(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, aux = a, data = simdata_aipw, alpha = c(1, 1), k = 1, nboot = 50, do.par = FALSE) ## End(Not run) ## Note that the user can use parallel computing to decrease ## the computation time of the bootstrap variance-covariance ## estimation (e.g. nboot = 50) ## Summarize semiparametric regression model summary(fit_aipw) ## Predict and draw plot the cumulative incidence function evaluated at z1 = 1 and z2 = 0.5 t <- seq(from = 0, to = 2.8, by = 2.8 / 99) pred <- predict(object = fit_aipw, covp = c(1, 0.5), times = t) pred plot(pred$t, pred$cif1, type = "l", ylim = c(0, 1)) points(pred$t, pred$cif2, type = "l", col = 2)
## Not run: ## Set seed in order to have reproducibility of the bootstrap standard error estimate set.seed(1234) ## Estimation of regression parameters only. No bootstrap variance estimation. ## with 'simdata_aipw' data(simdata_aipw) fit_aipw <- ciregic_aipw(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, aux = a, data = simdata_aipw, alpha = c(1, 1), nboot = 0, do.par = FALSE) fit_aipw ## Bootstrap variance estimation based on 50 replications fit_aipw <- ciregic_aipw(formula = Surv2(v = v, u = u, event = c) ~ z1 + z2, aux = a, data = simdata_aipw, alpha = c(1, 1), k = 1, nboot = 50, do.par = FALSE) ## End(Not run) ## Note that the user can use parallel computing to decrease ## the computation time of the bootstrap variance-covariance ## estimation (e.g. nboot = 50) ## Summarize semiparametric regression model summary(fit_aipw) ## Predict and draw plot the cumulative incidence function evaluated at z1 = 1 and z2 = 0.5 t <- seq(from = 0, to = 2.8, by = 2.8 / 99) pred <- predict(object = fit_aipw, covp = c(1, 0.5), times = t) pred plot(pred$t, pred$cif1, type = "l", ylim = c(0, 1)) points(pred$t, pred$cif2, type = "l", col = 2)
The function ciregic_lt
performs semiparametric regression on cumulative incidence function with left-truncated and interval-censored competing risks data. It fits the proportional subdistribution hazards model (Fine-Gray model), the proportional odds model, and other models that belong to the class of semiparametric generalized odds rate transformation models. The least-square method is implemented to estimate the standard error of the regression coefficients.
ciregic_lt(formula, data, alpha, k = 1, do.par, nboot, ...)
ciregic_lt(formula, data, alpha, k = 1, do.par, nboot, ...)
formula |
a formula object relating the survival object |
data |
a data frame that includes the variables named in the formula argument |
alpha |
|
k |
a parameter that controls the number of knots in the B-spline with |
do.par |
an option to use parallel computing for bootstrap. If |
nboot |
a number of bootstrap samples for estimating variances and covariances of the estimated regression coefficients. If |
... |
further arguments |
The function ciregic_lt
is capable of analyzing left-truncated and interval-censored competing risks data. A triplet of time points (w, v, u)
is required if an observation is left-truncated and interval-censored. A part of left-truncation is also allowed by defining w = 0
for interval-censored only observation. The formula for the model has the form of response ~ predictors
. The response in the formula is a Surv2(v, u, w, event)
object where w
is a left-truncation time, v
is the last observation time prior to the failure, u
is the first observation time after the failure, and event
is the event or censoring indicator. event
should include 0, 1 or 2, denoting right-censoring, failure from cause 1 and failure from cause 2, respectively. If event=0
(i.e. right-censored observation) then u
is not included in any calculation as it corresponds to . The user can provide any value in
u
for the right-censored cases, even NA
. The function ciregic_lt
fits models that belong to the class of generalized odds rate transformation models which includes the proportional subdistribution hazards or the Fine-Gray model and the proportional odds model. The parameter defines the link function/model to be fitted for cause of failure 1 and 2, respectively. A value of
0
corresponds to the Fine-Gray model and a value of 1
corresponds to the proportional odds model. For example, if then the function
ciregic_lt
fits the Fine-Gray model for cause 1 and the proportional odds model for cause 2.
The function ciregic_lt
provides an object of class ciregic_lt
with components:
varnames |
a vector containing variable names |
coefficients |
a vector of the regression coefficient estimates |
gamma |
a vector of the estimated coefficients for the B-splines |
vcov |
a variance-covariance matrix of the estimated regression coefficients |
alpha |
a vector of the link function parameters |
loglikelihood |
a loglikelihood of the fitted model |
convergence |
an indicator of convegence |
tms |
a vector of the minimum and maximum observation times |
Bv |
a list containing the B-splines basis functions evaluated at |
numboot |
a number of converged bootstrap |
notconverged |
a list of number of bootstrap samples that did not converge |
call |
a matched call |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Bakoyannis, G., Yu, M., and Yiannoutsos C. T. (2017). Semiparametric regression on cumulative incidence function with interval-censored competing risks data. Statistics in Medicine, 36:3683-3707.
Fine, J. P. and Gray, R. J. (1999). A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association, 94:496-509.
summary.ciregic_lt
for the summarized results and predict.ciregic_lt
for value of the predicted cumulative incidence functions. coef
and vcov
are the generic functions. dataprep
for reshaping data from a long format to a suitable format to be used in the function ciregic_lt
.
## Not run: ## Set seed in order to have reproducibility of the bootstrap standard error estimate set.seed(1234) ## Reshaping data from a long format to a suitable format newdata <- dataprep_lt(data = longdata_lt, ID = id, time = t, W = w, event = c, Z = c(z1, z2)) ## Estimation of regression parameters only. No bootstrap variance estimation. ## with 'newdata' fit_lt <- ciregic_lt(formula = Surv2(v = v, u = u, w = w, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 0, do.par = FALSE) fit_lt ## Bootstrap variance estimation based on 50 replications fit_lt <- ciregic_lt(formula = Surv2(v = v, u = u, w = w, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 50, do.par = FALSE) ## End(Not run) ## Note that the user can use parallel computing to decrease ## the computation time of the bootstrap variance-covariance ## estimation (e.g. nboot = 50) ## Summarize semiparametric regression model summary(fit_lt) ## Predict and draw plot the cumulative incidence function evaluated at z1 = 1 and z2 = 0.5 mint <- fit_lt$tms[1] maxt <- fit_lt$tms[2] pred <- predict(object = fit_lt, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt - mint) / 99)) pred plot(pred$t, pred$cif1, type = "l", ylim = c(0, 1)) points(pred$t, pred$cif2, type = "l", col = 2)
## Not run: ## Set seed in order to have reproducibility of the bootstrap standard error estimate set.seed(1234) ## Reshaping data from a long format to a suitable format newdata <- dataprep_lt(data = longdata_lt, ID = id, time = t, W = w, event = c, Z = c(z1, z2)) ## Estimation of regression parameters only. No bootstrap variance estimation. ## with 'newdata' fit_lt <- ciregic_lt(formula = Surv2(v = v, u = u, w = w, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 0, do.par = FALSE) fit_lt ## Bootstrap variance estimation based on 50 replications fit_lt <- ciregic_lt(formula = Surv2(v = v, u = u, w = w, event = c) ~ z1 + z2, data = newdata, alpha = c(1, 1), nboot = 50, do.par = FALSE) ## End(Not run) ## Note that the user can use parallel computing to decrease ## the computation time of the bootstrap variance-covariance ## estimation (e.g. nboot = 50) ## Summarize semiparametric regression model summary(fit_lt) ## Predict and draw plot the cumulative incidence function evaluated at z1 = 1 and z2 = 0.5 mint <- fit_lt$tms[1] maxt <- fit_lt$tms[2] pred <- predict(object = fit_lt, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt - mint) / 99)) pred plot(pred$t, pred$cif1, type = "l", ylim = c(0, 1)) points(pred$t, pred$cif2, type = "l", col = 2)
The function dataprep
reshapes data from a long format to a ready-to-use format to be used directly in the function ciregic
.
dataprep(data, ID, time, event, Z)
dataprep(data, ID, time, event, Z)
data |
a data frame that includes the variables named in the |
ID |
a variable indicating individuals' ID |
time |
a variable indicating observed time points |
event |
a vector of event indicator. If an observation is righ-censored, |
Z |
a vector of variables indicating name of covariates |
The function dataprep
provides a ready-to-use data format that can be directly used in the function ciregic
. The returned data frame consists of id
, v
, u
, c
, and covariates as columns. The v
and u
indicate time window with the last observation time before the event and the first observation after the event. The c
represents a type of event, for example, c = 1
for the first cause of failure, c = 2
for the second cause of failure, and c = 0
for the right-censored. For individuals having one time record with the event, the lower bound v
will be replaced by zero, for example (0, v]
. For individuals having one time record without the event, the upper bound u
will be replaced by Inf
, for example (v, Inf]
.
a data frame
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
library(intccr) dataprep(data = longdata, ID = id, time = t, event = c, Z = c(z1, z2))
library(intccr) dataprep(data = longdata, ID = id, time = t, event = c, Z = c(z1, z2))
The function dataprep_lt
reshapes data from a long format to a ready-to-use format to be used directly in the function ciregic_lt
.
dataprep_lt(data, ID, W, time, event, Z)
dataprep_lt(data, ID, W, time, event, Z)
data |
a data frame that includes the variables named in the |
ID |
a variable indicating individuals' ID |
W |
a vector of left-truncated time points |
time |
a variable indicating observed time points |
event |
a vector of event indicator. If an observation is righ-censored, |
Z |
a vector of variables indicating name of covariates |
The function dataprep_lt
provides a ready-to-use data format that can be directly used in the function ciregic_lt
. The returned data frame consists of id
, v
, u
, c
, and covariates as columns. The v
and u
indicate time window with the last observation time before the event and the first observation after the event. The c
represents a type of event, for example, c = 1
for the first cause of failure, c = 2
for the second cause of failure, and c = 0
for the right-censored. For individuals having one time record with the event, the lower bound v
will be replaced by zero, for example (0, v]
. For individuals having one time record without the event, the upper bound u
will be replaced by Inf
, for example (v, Inf]
.
a data frame
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
Generates the derivative of the B-splines basis matrix.
dbs( x, derivs = 1L, df = NULL, knots = NULL, degree = 3L, intercept = FALSE, Boundary.knots = range(x, na.rm = TRUE) )
dbs( x, derivs = 1L, df = NULL, knots = NULL, degree = 3L, intercept = FALSE, Boundary.knots = range(x, na.rm = TRUE) )
x |
object of B-splines |
derivs |
a number of derivatives |
df |
degrees of freedom of B-splines |
knots |
a vector of internal knots |
degree |
degrees of B-splines |
intercept |
a logical vector |
Boundary.knots |
a vector of boundary knots |
The function dbs
performs derivatives of B-splines
The function dbs
returns a component:
dMat |
B-spline matrix |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
ciregic
Object contains the output of the function ciregic
. Standard errors were estimated by the least-squares method.
fit
fit
A list of components.
fit
fit
ciregic_aipw
A list of outputs containing the last time prior to the event, the first time after the event, cause of failure with of missingness, and covariates.
fit_aipw
fit_aipw
A list of 14:
a matched call
a vector containing variable names
a vector containing auxiliary variable names
a vector of the regression coefficient estimates
a vector of the estimated coefficients for the B-splines
a variance-covariance matrix of the estimated regression coefficients
a vector of the link function parameters
a parameter that controls the number of knots in the B-spline
a loglikelihood of the fitted model
an indicator of convegence
a vector of the minimum and maximum observation times
a list containing the B-splines basis functions evaluated at v
a list of number of bootstrap samples not converged
fit_aipw
fit_aipw
ciregic_lt
Object contains the output of the function ciregic_lt
. Standard errors were estimated by the least-squares method.
fit_lt
fit_lt
A list of components.
fit_lt
fit_lt
The data containing the subject id, series of time points, cause of failure, and covariates with 200 observations.
longdata
longdata
A data frame with 868 rows and 5 variables.
library(intccr) data(longdata)
library(intccr) data(longdata)
Data containing observation time points, a left-truncation time, cause of failure, and baseline covariates with 275 observations.
longdata_lt
longdata_lt
A data frame with 275 unique individuals and 6 variables.
library(intccr) data(longdata_lt)
library(intccr) data(longdata_lt)
The function naive_b
provides a vector of initial values for the B-spline sieve maximum likelihood estimation.
naive_b(data, w = NULL, v, u, c, q, k = 1)
naive_b(data, w = NULL, v, u, c, q, k = 1)
data |
a data frame that includes the variables named in each argument |
w |
a left-truncation time (default is |
v |
the last observation time prior to the failure |
u |
the first observation time after the failure |
c |
an indicator of cause of failure, for example, if an observation is righ-censored, |
q |
a number of parameters in design matrix |
k |
a parameter that controls the number of knots in the B-spline with |
The function naive_b
provides initial values for the optimization procedure.
Initial values of B-spline estimation
b |
a vector of the initial values to be used in the optimization process |
Giorgos Bakoyannis, [email protected]
Jun Park, [email protected]
attach(simdata) intccr:::naive_b(data = simdata, v = v, u = u, c = c, q = 2)
attach(simdata) intccr:::naive_b(data = simdata, v = v, u = u, c = c, q = 2)
predict
method for class ciregic
. It provides the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
## S3 method for class 'ciregic' predict(object, covp, times, ...)
## S3 method for class 'ciregic' predict(object, covp, times, ...)
object |
an object of class |
covp |
a desired values for covariates |
times |
time points that user wants to predict value of cumulative incidence function |
... |
further arguments |
predict.ciregic
returns the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
The function predict.ciregic
returns a list of predicted values of the model from object
.
t |
time points |
cif1 |
the predicted value of cumulative incidence function for the event type 1 |
cif2 |
the predicted value of cumulative incidence function for the event type 2 |
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic
and summary of the fitted semiparametric regression model summary.ciregic
## Continuing the ciregic(...) example pfit <- predict(object = fit, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7)) pfit mint <- fit$tms[1] maxt <- fit$tms[2] pfit1 <- predict(object = fit, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt-mint)/99)) plot(pfit1$t, pfit1$cif1, ylim = c(0, 1), type = "l") lines(pfit1$t, pfit1$cif2, ylim = c(0, 1), lty = 2, col = 2)
## Continuing the ciregic(...) example pfit <- predict(object = fit, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7)) pfit mint <- fit$tms[1] maxt <- fit$tms[2] pfit1 <- predict(object = fit, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt-mint)/99)) plot(pfit1$t, pfit1$cif1, ylim = c(0, 1), type = "l") lines(pfit1$t, pfit1$cif2, ylim = c(0, 1), lty = 2, col = 2)
predict
method for class ciregic_aipw
. It provides the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
## S3 method for class 'ciregic_aipw' predict(object, covp, times, ...)
## S3 method for class 'ciregic_aipw' predict(object, covp, times, ...)
object |
an object of class |
covp |
a desired values for covariates |
times |
time points that user wants to predict value of cumulative incidence function |
... |
further arguments |
predict.ciregic_aipw
returns the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
The function predict.ciregic_aipw
returns a list of predicted values of the model from object
.
t |
time points |
cif1 |
the predicted value of cumulative incidence function for the event type 1 |
cif2 |
the predicted value of cumulative incidence function for the event type 2 |
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_aipw
and summary of the fitted semiparametric regression model summary.ciregic_aipw
## Continuing the ciregic_aipw(...) example pfit <- predict(object = fit_aipw, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7)) pfit mint <- fit_aipw$tms[1] maxt <- fit_aipw$tms[2] pfit1 <- predict(object = fit_aipw, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt - mint) / 99)) plot(pfit1$t, pfit1$cif1, ylim = c(0, 1), type = "l") lines(pfit1$t, pfit1$cif2, ylim = c(0, 1), lty = 2, col = 2)
## Continuing the ciregic_aipw(...) example pfit <- predict(object = fit_aipw, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7)) pfit mint <- fit_aipw$tms[1] maxt <- fit_aipw$tms[2] pfit1 <- predict(object = fit_aipw, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt - mint) / 99)) plot(pfit1$t, pfit1$cif1, ylim = c(0, 1), type = "l") lines(pfit1$t, pfit1$cif2, ylim = c(0, 1), lty = 2, col = 2)
predict
method for class ciregic_lt
. It provides the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
## S3 method for class 'ciregic_lt' predict(object, covp, times, ...)
## S3 method for class 'ciregic_lt' predict(object, covp, times, ...)
object |
an object of class |
covp |
a desired values for covariates |
times |
time points that user wants to predict value of cumulative incidence function |
... |
further arguments |
predict.ciregic_lt
returns the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
The function predict.ciregic_lt
returns a list of predicted values of the model from object
.
t |
time points |
cif1 |
the predicted value of cumulative incidence function for the event type 1 |
cif2 |
the predicted value of cumulative incidence function for the event type 2 |
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_lt
and summary of the fitted semiparametric regression model summary.ciregic_lt
## Continuing the ciregic_lt(...) example pfit <- predict(object = fit_lt, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7)) pfit mint <- fit_lt$tms[1] maxt <- fit_lt$tms[2] pfit1 <- predict(object = fit_lt, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt - mint) / 99)) plot(pfit1$t, pfit1$cif1, ylim = c(0, 1), type = "l") lines(pfit1$t, pfit1$cif2, ylim = c(0, 1), lty = 2, col = 2)
## Continuing the ciregic_lt(...) example pfit <- predict(object = fit_lt, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7)) pfit mint <- fit_lt$tms[1] maxt <- fit_lt$tms[2] pfit1 <- predict(object = fit_lt, covp = c(1, 0.5), times = seq(mint, maxt, by = (maxt - mint) / 99)) plot(pfit1$t, pfit1$cif1, ylim = c(0, 1), type = "l") lines(pfit1$t, pfit1$cif2, ylim = c(0, 1), lty = 2, col = 2)
Evaluates the derivative of the B-splines basis matrix at given values.
## S3 method for class 'dbs' predict(object, newx)
## S3 method for class 'dbs' predict(object, newx)
object |
returned object of B-splines |
newx |
a vector of points |
The function predict
is a generic function of bs.derivs
The function predict
returns a predicted B-splies.
Giorgos Bakoyannis, [email protected]
Jun Park, [email protected]
Artificial dataset that was simulated to resemble the HIV study on loss to HIV care and death in sub-Saharan Africa, that was presented in Bakoyannis, Yu, & Yiannoutsos (2017). It contains subject id, observation times, cause of failure, and covariates.
pseudo.HIV.long
pseudo.HIV.long
A data frame with 22710 rows and 6 variables.
Bakoyannis, G., Yu, M., and Yiannoutsos C. T. (2017). Semiparametric regression on cumulative incidence function with interval-censored competing risks data. Statistics in Medicine, 36:3683-3707.
head(pseudo.HIV.long, n = 20)
head(pseudo.HIV.long, n = 20)
The data containing the idividual identification number, the last time point prior to the event, the first time point after the event, cause of failure, and covariates with 200 observations.
simdata
simdata
A data frame with 200 rows and 6 variables.
subject id
the last observation time prior to the event
the first observation time after the event
cause of failure with missing
binary variable
continuous variable
library(intccr) data(simdata)
library(intccr) data(simdata)
of missing cause of failure - wide formatThe dataset containing the individual identification number, the last time prior to the event, the first time after the event, cause of failure with of missingness, and covariates.
simdata_aipw
simdata_aipw
A data frame with 200 rows and 7 variables:
subject id
the last observation time prior to the event
the first observation time after the event
cause of failure with missing
binary variable
continuous variable
auxiliary variable
library(intccr) data(simdata_aipw)
library(intccr) data(simdata_aipw)
The data containing the individual identification number, the left-truncated time, the last and first observation time prior to the event and after the event, cause of failure, and baseline covariates with 275 observations.
simdata_lt
simdata_lt
A data frame with 275 unique individuals and 7 variables.
subject id
the left truncation time
the last observation time prior to the event
the first observation time after the event
cause of failure with missing
binary variable
continuous variable
library(intccr) data(simdata_lt)
library(intccr) data(simdata_lt)
ciregic
summary
method for class ciregic
## S3 method for class 'ciregic' summary(object, ...)
## S3 method for class 'ciregic' summary(object, ...)
object |
an object of class |
... |
further arguments |
The function summary.ciregic
returns the coefficients, bootstrap standard errors, and etc. Additionally, 'significance star' is included.
The function summary.ciregic
returns a list of summary statistics of the model from object
.
varnames |
a vector containing variable names |
coefficients |
a vector of the regression coefficient estimates |
se |
a bootstrap standard error of the coefficients |
z |
z value of the estimated coefficients |
p |
p value of the estimated coefficients |
call |
a matched call |
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic
and values of the predicted cumulative incidence functions predict.ciregic
## Continuing the ciregic(...) example sfit <- summary(fit) sfit
## Continuing the ciregic(...) example sfit <- summary(fit) sfit
ciregic_aipw
summary
method for class ciregic_aipw
## S3 method for class 'ciregic_aipw' summary(object, ...)
## S3 method for class 'ciregic_aipw' summary(object, ...)
object |
an object of class |
... |
further arguments |
The function summary.ciregic_aipw
returns the coefficients, bootstrap standard errors, and etc. Additionally, 'significance star' is included.
The function summary.ciregic_aipw
returns a list of summary statistics of the model from object
.
varnames |
a vector containing variable names |
coefficients |
a vector of the regression coefficient estimates |
se |
a bootstrap standard error of the coefficients |
z |
z value of the estimated coefficients |
p |
p value of the estimated coefficients |
call |
a matched call |
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_aipw
and values of the predicted cumulative incidence functions predict.ciregic_aipw
## Continuing the ciregic_aipw(...) example sfit <- summary(fit_aipw) sfit
## Continuing the ciregic_aipw(...) example sfit <- summary(fit_aipw) sfit
ciregic_lt
summary
method for class ciregic_lt
## S3 method for class 'ciregic_lt' summary(object, ...)
## S3 method for class 'ciregic_lt' summary(object, ...)
object |
an object of class |
... |
further arguments |
The function summary.ciregic_lt
returns the coefficients, bootstrap standard errors, and etc. Additionally, 'significance star' is included.
The function summary.ciregic_lt
returns a list of summary statistics of the model from object
.
varnames |
a vector containing variable names |
coefficients |
a vector of the regression coefficient estimates |
se |
a bootstrap standard error of the coefficients |
z |
z value of the estimated coefficients |
p |
p value of the estimated coefficients |
call |
a matched call |
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_lt
and values of the predicted cumulative incidence functions predict.ciregic_lt
## Continuing the ciregic_lt(...) example sfit_lt <- summary(fit_lt) sfit_lt
## Continuing the ciregic_lt(...) example sfit_lt <- summary(fit_lt) sfit_lt
The function Surv2
generates the survival object to be treated as the response from ciregic
.
Surv2(v, u, w = NULL, sub = NULL, event)
Surv2(v, u, w = NULL, sub = NULL, event)
v |
the last observation time prior to the failure; |
u |
the first observation time after the failure; |
w |
a left truncation time or delayed entry time. The default setting is |
sub |
an indicator variable in the data set. It is an optional argument for interval-censored competing risks data and missing cause of failure, and the default is |
event |
an indicator of cause of failure. If an observation is righ-censored, |
The function Surv2
provides a response data frame which is used in the function ciregic
and ciregic_lt
. For interval-censored competing risks data, the function Surv2
must use three parameters (v, u, c
). For left-truncated and interval censored competing risks data, the function Surv2
must use four parameters (v, u, w, c
). If data are partially left-truncated, but all interval-censored, w = 0
for only interval-censored competing risks data.
data frame
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
attach(simdata) Surv2(v = v, u = u, event = c) attach(simdata_lt) Surv2(v = v, u = u, w = w, event = c)
attach(simdata) Surv2(v = v, u = u, event = c) attach(simdata_lt) Surv2(v = v, u = u, w = w, event = c)
ciregic
vcov
method for class ciregic
## S3 method for class 'ciregic' vcov(object, ...)
## S3 method for class 'ciregic' vcov(object, ...)
object |
an object of class |
... |
further arguments |
The function vcov
returns the variance-covariance matrix of the fitted semiparametric regression model.
The estimated bootstrap variance-covariance matrix
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic
, summary of the fitted semiparametric regression model summary.ciregic
, and values of predicted cumulative incidence functions predict.ciregic
## Continuing the ciregic(...) example vcov(fit)
## Continuing the ciregic(...) example vcov(fit)
ciregic_aipw
vcov
method for class ciregic_aipw
## S3 method for class 'ciregic_aipw' vcov(object, ...)
## S3 method for class 'ciregic_aipw' vcov(object, ...)
object |
an object of class |
... |
further arguments |
The function vcov
returns the variance-covariance matrix of the fitted semiparametric regression model.
The estimated bootstrap variance-covariance matrix
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_aipw
, summary of the fitted semiparametric regression model summary.ciregic_aipw
, and values of predicted cumulative incidence functions predict.ciregic_aipw
## Continuing the ciregic_aipw(...) example vcov(fit_aipw)
## Continuing the ciregic_aipw(...) example vcov(fit_aipw)
ciregic_lt
vcov
method for class ciregic_lt
## S3 method for class 'ciregic_lt' vcov(object, ...)
## S3 method for class 'ciregic_lt' vcov(object, ...)
object |
an object of class |
... |
further arguments |
The function vcov
returns the variance-covariance matrix of the fitted semiparametric regression model.
The estimated bootstrap variance-covariance matrix
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_lt
, summary of the fitted semiparametric regression model summary.ciregic_lt
, and values of predicted cumulative incidence functions predict.ciregic_lt
## Continuing the ciregic_lt(...) example vcov(fit_lt)
## Continuing the ciregic_lt(...) example vcov(fit_lt)
summary.ciregic
vcov
method for class summary.ciregic
## S3 method for class 'summary.ciregic' vcov(object, ...)
## S3 method for class 'summary.ciregic' vcov(object, ...)
object |
an object of class |
... |
further arguments |
The vcov
returns the variance-covariance matrix of the fitted semiparametric regression model.
The estimated bootstrap variance-covariance matrix
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic
, summary of the fitted semiparametric regression model summary.ciregic
, and values of the predicted cumulative incidence functions predict.ciregic
## Continuing the ciregic(...) example vcov(summary(fit))
## Continuing the ciregic(...) example vcov(summary(fit))
summary.ciregic_aipw
vcov
method for class summary.ciregic_aipw
## S3 method for class 'summary.ciregic_aipw' vcov(object, ...)
## S3 method for class 'summary.ciregic_aipw' vcov(object, ...)
object |
an object of class |
... |
further arguments |
The vcov
returns the variance-covariance matrix of the fitted semiparametric regression model.
The estimated bootstrap variance-covariance matrix
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_aipw
, summary of the fitted semiparametric regression model summary.ciregic_aipw
, and values of the predicted cumulative incidence functions predict.ciregic_aipw
## Continuing the ciregic_aipw(...) example vcov(summary(fit_aipw))
## Continuing the ciregic_aipw(...) example vcov(summary(fit_aipw))
summary.ciregic_lt
vcov
method for class summary.ciregic_lt
## S3 method for class 'summary.ciregic_lt' vcov(object, ...)
## S3 method for class 'summary.ciregic_lt' vcov(object, ...)
object |
an object of class |
... |
further arguments |
The vcov
returns the variance-covariance matrix of the fitted semiparametric regression model.
The estimated bootstrap variance-covariance matrix
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_lt
, summary of the fitted semiparametric regression model summary.ciregic_lt
, and values of the predicted cumulative incidence functions predict.ciregic_lt
## Continuing the ciregic_lt(...) example vcov(summary(fit_lt))
## Continuing the ciregic_lt(...) example vcov(summary(fit_lt))
ciregic
and ciregic_lt
waldtest
for class ciregic
or ciregic_lt
. This provides the result of Wald test for the fitted model from the function ciregic
or ciregic_lt
.
waldtest(obj1, obj2 = NULL, ...)
waldtest(obj1, obj2 = NULL, ...)
obj1 |
an object of the fitted model in |
obj2 |
an object of the fitted model in |
... |
further arguments |
The function waldtest.ciregic
returns a result of Wald test.
The function waldtest
returns an output table of Wald test of the model from object
.
varnames.full |
a variable name of a vector of variables names in the full model |
varnames.nested |
a variable name of a vector of variables names in the nested model |
vcov |
the estimated bootstrap variance-covariance matrix for overall Wald test |
vcov.event1 |
the estimated bootstrap variance-covariance matrix for cause-specific Wald test (event type 1) |
vcov.event2 |
the estimated bootstrap variance-covariance matrix for cause-specific Wald test (event type 2) |
table |
a table including test statistic, degrees of freedom, and p-value |
Jun Park, [email protected]
Giorgos Bakoyannis, [email protected]
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic
and left-truncated and interval-censored competing risks data ciregic_lt
## Continuing the ciregic(...) example library(intccr) waldtest(obj1 = fit) set.seed(12345) newdata <- dataprep(data = longdata, ID = id, time = t, event = c, Z = c(z1, z2)) fit.nested <- ciregic(formula = Surv2(v = v, u = u, event = c) ~ z2, data = newdata, alpha = c(1, 1), nboot = 0, do.par = FALSE) waldtest(obj1 = fit, obj2 = fit.nested)
## Continuing the ciregic(...) example library(intccr) waldtest(obj1 = fit) set.seed(12345) newdata <- dataprep(data = longdata, ID = id, time = t, event = c, Z = c(z1, z2)) fit.nested <- ciregic(formula = Surv2(v = v, u = u, event = c) ~ z2, data = newdata, alpha = c(1, 1), nboot = 0, do.par = FALSE) waldtest(obj1 = fit, obj2 = fit.nested)