MCPModSurv: MCPModSurv - Multiple Comparison and Modeling for Coxph and...

Description Usage Arguments Details Value

View source: R/MCPModSurv.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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,
  ...
)

Arguments

model

A character string containing the survival regression model.

dist

A character string for the distribution, in the case when model is "parametric". Must be one of "weibull", "exponential", "gaussian", "logistic", "lognormal", or "loglogistic".

returnS

Logical determining whether muHat and SHat should be returned, in additional to the MCPMod output.

dose, resp, status

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

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

models

An object of class "Mods", see Mods for details

placAdj

Logical specifying whether the provided by 'resp' are to be treated as placebo-adjusted estimates.

selModel

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(exp(-0.5AIC_i)) See Buckland et al. (1997) for details.

For type = "general" the "gAIC" is used.

alpha

Significance level for the multiple contrast test

df

An optional numeric value specifying the degrees of freedom. Infinite degrees of freedom ('df=Inf', the default), correspond to the multivariate normal distribution.

critV

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

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.

Delta

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.

p

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.

pVal

Logical determining, whether p-values should be calculated.

alternative

Character determining the alternative for the multiple contrast trend test.

na.action

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

mvtcontrol

A list specifying additional control parameters for the qmvt and pmvt calls in the code, see also mvtnorm.control for details.

bnds

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

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.

Details

'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.

Value

An object of class MCPMod if returnS = FALSE. Otherwise, a list containing an object of class MCPMod, the numeric vector μ, and the numeric matrix S.


MCPModGeneral documentation built on March 26, 2020, 7:14 p.m.