fit_submodels {fic} | R Documentation |
Fit submodels of a general linear wide model, defined by a matrix of indicators for inclusion of covariates
Description
Fit the submodels of a wide model wide
which are defined by
inds
. This can only be used for covariate selection
problems, where the submodels contain different subsets of
covariates.
Usage
fit_submodels(wide, inds, ...)
Arguments
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 |
... |
Other arguments to the focus function can be supplied here. The built-in focus functions If just one focus is needed, then To compute focused model comparison statistics for multiple focuses defined by the same focus function evaluated at multiple covariate values, For a typical regression model, the first parameter will denote an intercept, so the first value of Arguments to the focus function other than |
Details
Requires wide
to have a component named
call
giving the function call used to produce wide
.
This call should include a formula
component, which this
function updates in order to define and fit the submodel. This
should work for most standard linear-type models in common R packages.
Value
List of all fitted submodel objects.
Examples
bwt.glm <- glm(low ~ lwtkg + age + smoke,
data=birthwt, family="binomial")
inds <- rbind(c(1,1,1,0), c(1,1,0,0))
fit_submodels(bwt.glm, inds=inds)