el.est.table: Table for Empirical Likelihood-Based (EL) Method

Description Usage Arguments Value Examples

View source: R/el.est.table.R

Description

Generate table for estimated survival probabilities by EL for treatment, control and their difference. Require formattable package to run.

Usage

1
2
el.est.table(y,delta,treat,x,psix_moment = c("first","second"),
t,Nboot=500,standardize=FALSE)

Arguments

y

a numeric vector of observed time

delta

a factor vector of indicator for events

treat

a factor vector of the treatment indicator

x

an optional covariance matrix containing the variables in the model

psix_moment

first or second, which correspond to adjusting first or second moments of the covariates matrix x

t

a numeric vector of time points for estimation

Nboot

number of iterations in Bootstrap, default by 500

standardize

a logical object of whether the covariance matrix x would be centered and scaled, default by FALSE

Value

A table (formattable object) containing the estimated S(t) with standard deviation at each time point.

Examples

1
2
3
4
5
6
7
8
9
library(survival)
y <- as.matrix(gbsg$rfstime/(365.25/12))
treat <- data.matrix(gbsg$hormon)
delta <- as.matrix(gbsg$status)
x <- data.matrix(gbsg[,c("age","meno","size","grade","nodes","pgr","er")])
t <- seq(0,80,2)

el.est.table(y=y,delta=delta,treat=treat,x=x,psix_moment="first",t=t,
             Nboot=500,standardize=FALSE)

kimihua1995/adjKMtest documentation built on Jan. 1, 2021, 7:20 a.m.