rld.fit: Discrete-Time Survival Model Fitting Function

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/rld.fit.R

Description

This is the function called by rld that do the actual computation.

Usage

1
rld.fit(X, C, delta, initial, lower, upper, frailty)

Arguments

X

a design matrix created based on the input formula.

C

a vector containing censoring times.

delta

a vector contatining censoring status in which"1" denotes failure, "0" denotes right-censoring.

initial

a vector containing initial values for the paramters to be optimized over.

lower

a vector containing lower bound values for the paramters to be optimized over.

upper

a vector containing upper bound values for the paramters to be optimized over.

frailty

logical value: If TRUE, a discrete-time survival model with random effects will be used.

Details

optim is used to maximize the log-likelihood function. Method "L-BFGS-B" is that of Byrd et. al (1995) which allows box constraints, that is each variable can be given a lower and/or upper bound.

Value

coefficients

parameter estimates.

hessian

hessian matrix.

LikFunValue

log-likelihood value.

Note

Don't use this function when you are not familiar with the whole computational procedure.

Author(s)

Bin Yao, Ying Huang and Chaeryon Kang

References

Kang, C., Huang, Y., and Miller, C. (2015). A discrete-time survival model with random effects for designing and analyzing repeated low-dose challenge experiments. Biostatistics, 16(2): 295-310.

Byrd, R.H., Lu, P. Nocedal, J. and Zhu, C. (1995). A limited memory algorithm for bound constrained optimization. SIAMJ. Scientific Computing, 16, 1190-1208.

See Also

rld, optim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(SampleData)
newdata <- transdata(data = SampleData, ndlevel = 3, nexposure = c(10, 10, 2))
formulaexp <- survival::Surv(time, delta)~factor(dose)+trt+I(I(dose==3)*trt)
designmat <- model.matrix(formulaexp, data = newdata)
time <- SampleData$time
status <- SampleData$delta
inival <- rep(0.5, 6)
lwrval <- c(rep(-Inf, 5), 0.01)
uprval <- rep(Inf, 6)
frailty <- TRUE

rld.fit(X = designmat, C = time, delta = status, initial = inival,
        lower = lwrval, upper = uprval, frailty = frailty)

rld documentation built on May 2, 2019, 5:57 a.m.