simcode {PHInfiniteEstimates}R Documentation

Simulate Weibull survival data from a model, perform reduction to remove infinite estimates, and calculate p values.

Description

Operating characteristics for the approximate conditional inferential approach to proportional hazards.

Usage

simcode(
  dataset,
  myformula,
  iv,
  ctime,
  nsamp = 10000,
  add = NULL,
  nobs = NA,
  half = FALSE,
  verbose = FALSE
)

Arguments

dataset

the data set to use

myformula

the formula for the Cox regression

iv

name of the variable of interest, as a character string

ctime

fixed censoring time

nsamp

number of samples.

add

preliminary results, if any.

nobs

number of observations in target models, if different from that of dataset.

half

logical flag triggering a less extreme simulation by dividing the Weibull regression parameters in half.

verbose

logical flag triggering intermediate messaging.

Details

This function is intended to verify the operating characteristics of the approximate conditional inferential approach of Kolassa and Zhang (2019) to proportional hazards regression. A Weibull regression model, corresponding to the proportional hazards regression model, is fit to the data, and new data sets are simulated from this model. P-values are calculated for these new data sets, and their empirical distribution is compared to the theoretical uniform distribution.

Value

a list with components

References

Kolassa JE, Zhang J (2019). https://higherlogicdownload.s3.amazonaws.com/AMSTAT/fa4dd52c-8429-41d0-abdf-0011047bfa19/UploadedImages/NCB_Conference/Presentations/2019/kolassa_toxslides.pdf. Accessed: 2019-07-14.

Examples

data(breast)

breasttestp<-simcode(breast,Surv(TIME,CENS)~ T+ N+ G+ CD,"T",72,nsamp=100,verbose=TRUE)


[Package PHInfiniteEstimates version 2.9.5 Index]