This function allows the user to implement the MCPMod function on a Cox
proportional hazards regression model and a parametric survival model. The
function works very similarly to
MCPModGen
, but is unique enough in
terms of the data and the parameters to warrant its own function.
MCPModSurv(
model = c("coxph", "parametric"),
dist = NULL,
returnS = FALSE,
dose,
resp,
status,
data = NULL,
models,
placAdj = FALSE,
selModel = c("AIC", "maxT", "aveAIC"),
alpha = 0.025,
df = NULL,
critV = NULL,
doseType = c("TD", "ED"),
Delta,
p,
pVal = TRUE,
alternative = c("one.sided", "two.sided"),
na.action = na.fail,
mvtcontrol = mvtnorm.control(),
bnds,
control = NULL,
...
)
An object of class MCPMod if returnS = FALSE. Otherwise, a list containing an object of class MCPMod, the numeric vector \(\mu\), and the numeric matrix \(S\).
A character string containing the survival regression model.
A character string for the distribution, in the case when
model
is "parametric". Must be one of "weibull
",
"exponential
", "gaussian
", "logistic
",
"lognormal
", or "loglogistic
".
Logical determining whether muHat and SHat should be returned, in additional to the MCPMod output.
Either character strings specifying the names of the
respective columns in the data
data frame, or numeric vectors of
equal length containing their respective values. status
refers to
whether an observation was censored or not. If no observations were
censored, status
should be a vector of 1s.
Data frame with names specified in `dose`, `resp`, and optionally `w`. If data is not specified, it is assumed that `dose` and `resp` are numerical vectors
An object of class "Mods", see Mods
for
details
Logical specifying whether the provided by `resp` are to be treated as placebo-adjusted estimates.
Optional character vector specifying the model selection criterion for dose estimation. Possible values are
AIC
: Selects model with smallest AIC (this is the default)
maxT
: Selects the model corresponding to the largest t-statistic.
aveAIC
: Uses a weighted average of the models corresponding to the
significant contrasts. The model weights are chosen by the formula:
\(w_i = \exp(-0.5AIC_i)/\sum_i(\exp(-0.5AIC_i))\)
See Buckland et al. (1997) for details.
For type = "general" the "gAIC" is used.
Significance level for the multiple contrast test
An optional numeric value specifying the degrees of freedom. Infinite degrees of freedom (`df=Inf`, the default), correspond to the multivariate normal distribution.
Supply a pre-calculated critical value. If this argument is NULL, no critical value will be calculated and the test decision is based on the p-values. If critV = TRUE the critical value will be calculated.
doseType determines the dose to estimate, ED or TD (see also
Mods
), and Delta and p need to be
specified depending on whether TD or ED is to be estimated.
See TD
and ED
for details.
Logical determining, whether p-values should be calculated.
Character determining the alternative for the multiple contrast trend test.
A function which indicates what should happen when the data contain NAs.
A list specifying additional control parameters for the qmvt
and pmvt calls in the code, see also mvtnorm.control
for details.
Bounds for non-linear parameters. This needs to be a list with list
entries corresponding to the selected bounds. The names of the list
entries need to correspond to the model names. The
defBnds
function provides the default selection.
Control list for the optimization.
A list with entries: "nlminbcontrol", "optimizetol" and "gridSize".
The entry nlminbcontrol needs to be a list and is passed directly to control argument in the nlminb function, that is used internally for models with 2 nonlinear parameters (e.g. sigmoid Emax or beta model).
The entry optimizetol is passed directly to the tol argument of the optimize function, which is used for models with 1 nonlinear parameters (e.g. Emax or exponential model).
The entry gridSize needs to be a list with entries dim1 and dim2 giving the size of the grid for the gridsearch in 1d or 2d models.
Additional arguments to be passed to coxph
or
survreg
. This is especially useful when a fitting error is returned.
`MCPModSurv` works by making calls to `coxph`, `survreg`, and `Surv` from the `survival` package. After retrieving coefficient estimates and the estimated covariance matrix, values are passed into the `MCPMod` function from the `DoseFinding` package.