plotLC: Plots Logconcave Fit

Description Usage Arguments Author(s) Examples

View source: R/LogConcave.R

Description

Plots the fit of a log concave object

Usage

1
  plotLC(fit, funtype = 'surv', covars = NA, ...)

Arguments

fit

A fit object returned from a call to logconcave

funtype

Type of function plotted. Choices are 'surv', 'pdf' or 'cdf'. If missing, 'surv' in default

covars

CoxPH covariates

...

Additional arguments to be passed to plot

Author(s)

Clifford Anderson-Bergman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  fit = logconcave(rnorm(500) )
  # Fits a log concave estimator to an uncensored sample
  
  plotLC(fit)      				
  # Plots the estimated survival distribution
  
  simData <- simPH_Censored()
  # Simulates current status data from a CoxPH model
  
  fit <- logconcave(simData$times, simData$x)
  # Fits coxPH model
  
  plotLC(fit, covars = c(0,0), funtype = 'cdf')
  # Plots the estimated baseline cdf
  
  linesLC(fit, covars = c(1,1), funtype = 'cdf', col = 'red')
  # Plots the estimates cdf with covariates c(1,1)

logconPH documentation built on May 29, 2017, 3:33 p.m.