- wide
Fitted model object containing the wide model.
- inds
Matrix or vector of indicators for which parameters are included in the submodel or submodels to be assessed.
A matrix should be supplied if there are multiple submodels. This should have number of rows equal to the number of submodels, and number of columns equal to the total number of parameters in the wide model. It contains 1s in the positions where the parameter is included in the submodel, and 0s in positions where the parameter is excluded. This should always be 1 in the positions defining the narrow model, as specified in inds0
.
- inds0
Vector of indicators specifying the narrow model, in the same format as inds
. If this is omitted, the narrow model is assumed to be defined by the first row of inds
(if inds
is a matrix), or inds
itself if this is a vector.
- gamma0
Vector of special values taken by the parameters \(gamma\) which define the narrow model.
This defaults to 0, as in covariate selection, where "excluded" coefficients are fixed to 0.
This should either be a scalar, assumed to be the same for all parameters fixed in the narrow model, or a vector of length equal to the number of parameters from the wide model which are fixed in the narrow model, that is, the number of entries of inds0
which are zero.
- focus
Three built-in focus quantities are supported:
"hr"
for the hazard ratio between individuals with covariate values of X
and 0.
"survival"
for the survival probability at time or times given in t
.
"cumhaz"
for the cumulative hazard at time or times given in t
.
Alternatively, a list of three R functions can be supplied, with components named "focus"
, "deriv"
and "dH"
respectively giving the focus, derivative with respect to the log hazard ratios, and derivative with respect to the cumulative hazards. Each function should have arguments par
, H0
, X
and t
, giving the log hazard ratios, baseline cumulative hazard, covariate values and time points at which the focus function should be evaluated. See the section "User-defined focuses" below for a little more information.
- X
Covariate values to evaluate the focus at. See fic
, argument ...
, for the required format.
- t
times to evaluate the focus at. Only relevant for survival and cumulative hazard focuses, as the hazard ratio is constant through time.
- sub
If "auto"
(the default) then the submodels are fitted automatically within this function. If NULL
they are not fitted, and focus estimates are not returned with the results.
- tidy
If TRUE
the results are returned as a data frame with variables to indicate the submodels, focuses and corresponding result statistics. If FALSE
, the results are returned as a three-dimensional array, with dimensions indexed by the submodels, result statistics and focuses respectively.
- ...
Other arguments to the focus function can be supplied here.
The built-in focus functions prob_logistic
and mean_normal
take an argument X
giving covariate values defining the focus. This can either be a matrix or a vector, or a list or data frame that can be coerced into a matrix.
If just one focus is needed, then X
can be a vector of length equal to the number of parameters in the wide model.
To compute focused model comparison statistics for multiple focuses defined by the same focus function evaluated at multiple covariate values, X
should be a matrix, with number of columns equal to the number of parameters in the wide model, and number of rows equal to the number of alternative focuses.
For a typical regression model, the first parameter will denote an intercept, so the first value of X
should be 1, and the remaining values should correspond to covariates whose coefficients form parameters of the wide model. See the examples in the vignette.
Arguments to the focus function other than X
can also be supplied as a matrix, vector, list or data frame in the same way. An exception is when the argument is supplied as a vector, this is assumed to refer to multiple focuses. For example, suppose the focus function defines the quantile of a distribution, and takes an argument focus_p
, then calling fic(...,focus_p=c(0.1, 0.9))
indicates two alternative focuses defined by the 0.1 and 0.9 quantiles.