Description Usage Arguments Value Examples
Form indicator matrix describing all possible submodels of a general linear wide model, where the submodels are defined by selected covariates.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
wide |
A fitted model of standard R format, such that |
inds0 |
Narrow model indicators, in format described in |
auxpars |
Names of parameters in the wide model other than the covariate effects being selected from. By default, for linear and generalised linear models this is |
... |
Other arguments. Currently unused. |
A matrix in the format required by the inds
argument of fic()
, representing all possible submodels of the wide model.
The number of rows is the number of models, and the number of columns is the number of parameters in the wide model. The r,s entry of the matrix is a 1 if the rth submodel includes parameter s, and 0 otherwise.
If a factor is included (excluded) from the submodel, then all corresponding parameters are included (excluded).
See the package vignettes for examples.
1 2 3 4 5 6 7 | bwt.glm <- glm(low ~ lwtkg + age + smoke, data=birthwt, family="binomial")
all_inds(bwt.glm, inds0=c(1,0,0,0))
# note no intercept term in Cox models, so inds0 has two elements here
library(survival)
wide <- coxph(Surv(years, death==1) ~ sex + thick_centred, data=melanoma)
all_inds(wide, inds0=c(0,0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.