fit = logconcave(rnorm(500) )
# Fits a log concave estimator to an uncensored sample
qLC(0.5, fit)
# Estimates the median
simData <- sim_Censored(n = 400)
# Simulates current status data
fit = logconcave(simData)
# Fits a log concave estimator to an interval censored sample
pLC(0.5, fit)
# Estimates the cdf at t = 0.5
plotLC(fit, 'surv')
# Plots the estimated survival function.
# Options for second argument are 'pdf', 'cdf' and 'surv'
simData <- simPH_Censored()
# Simulates current status data from a Cox-PH model
fit <- logconcave(times = simData$times, covariates = simData$x)
# Fits a Cox-PH model with a logconcave baseline distribution
plotLC(fit, covars = c(0,0) )
# Plots the estimated baseline survival function
linesLC(fit, covars = c(1,1), col = 'red')
# Plots the estimated survival function with x1 = 1, x2 = 1
Run the code above in your browser using DataLab