Learn R Programming

logconPH (version 1.5)

simPH_Censored: Simulate current status data from Cox-PH model

Description

Simulates current status data from a Cox-PH model with a gamma baseline distribution. Used for demonstration of use of logconcave function.

Usage

simPH_Censored(n = 100, b1 = 0.5, b2 = -0.5, shape = 2)

Arguments

n
Number of samples simulated
b1
Value of first regression coefficient
b2
Value of second regression coefficient
shape
Shape parameter of baseline gamma distribution

Examples

Run this code
  simData <- simPH_Censored()
  # Simulates censored data from a Cox-PH model
  
  fit <- logconcave(times = simData$times, covariates = simData$x)
  # Fits a Cox-PH model with a logconcave baseline distribution

Run the code above in your browser using DataLab