Description Usage Arguments Details Value Examples
View source: R/create_modelset.R
Function create_modelset creates a matrix indicating
covariates (fixed effects) in each model considered by the user
1 2 3 4 5 | create_modelset(
modelset = c("all_subsets", "nested", "part_subset"),
common = NULL,
p = 5
)
|
modelset |
Type of model set:
|
common |
A vector indicating variables forced to be
present in each model. Default: |
p |
Number of all covariates under consideration
(intercept included). Default: |
modelset = "nested"The first model contains one covariate from the first column of X, then two covariates from the first and the second column of X, etc.
commonA vector of length at most p, consisting of those column
numbers of X for which the covariates are forced to be present
in every model (e.g. c(2,5) for variables 2 and 5). If provided,
it is used in model.set = "partsubsets".
modelset_matrix |
Matrix composed of zeros and ones. Ones correspond to covariates in a model which is represented in nth row. |
1 2 3 4 5 6 7 8 9 | # "all_subsets"
modelset = create_modelset("all_subsets", p = 5)
# "nested"
modelset = create_modelset("nested", p = 5)
# "part_subset"
modelset = create_modelset("part_subset", p = 5,
common = c(1:3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.