rld: Fit a Discrete-Time Survival Model

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

View source: R/rld.R

Description

This function fits a discrete-time survival model with and without random effects.

Usage

1
rld(formula, data, na.action, initial=NULL, lower=NULL, upper=NULL, frailty=TRUE)

Arguments

formula

a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a survival object as returned by Surv function. The terms is a series of terms which specify linear predictors for response.

data

a data.frame in which to interpret the variables named in the formula. This augmented data frame can be returned by function transdata.

na.action

a function which indicates what should happen when the data contain NAs.

initial

a vector of initial values for the paramters to be optimized over. If NULL, the default initial values will be used.

lower

a vector of lower bound values for the paramters. If NULL, the default lower bound will be used.

upper

a vector of upper bound values for the parameters. If NULL, the default upper bound will be used.

frailty

logic value: if TRUE, the discrete-time survival model with random effects will be run. Otherwise it is assumed that there is no random effect. The default is TRUE.

Details

Kang et al. (2015) proposed to use a discrete-time survival model with gamma-distributed random effects and a complementary log-log link function to model data from repeated low-dose challenge studies, assuming an animal's risks of infection across challenges are independent of each other conditional on random effects. Please refer to Kang et al.(2015) for more details.

Value

rld returns an object of class “rld”. The functions summary is used to obtain and print a summary of the results.

coefficients

a vector of parameter estimates.

hessian

the hessian matrix returned from the function optim.

X

the design matrix created based on the input formula.

VEexpr

the formula expression on the right of ~ operator.

loglikvalue

the log-likelihood value.

call

the matched call.

frailty

the chosen model.

augdata

the augmented data set.

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.

See Also

rld.fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(SampleData)
newdata <- transdata(data = SampleData, ndlevel = 3, nexposure = c(10, 10, 2))

#interaction between the hightest dose level and treatment assignment
#under the discrete-time survival model with random effects

fitout1 <- rld(formula = survival::Surv(time, delta)~factor(dose)+trt+I(I(dose==3)*trt),
              data = newdata, frailty = TRUE)
#summary(fitout1)

## Not run: 
#main effects model without random effectss
ini <- rep(0.5, 4)
lwr <- rep(-Inf, 4)
upr <- rep(Inf, 4)

fitout2 <- rld(formula = survival::Surv(time, delta)~factor(dose)+trt,
               initial = ini, lower = lwr, upper = upr, data = newdata,
               frailty = FALSE)
#summary(fitout2)

## End(Not run)

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