choose_model | R Documentation |
The _pairwise family of functions all demand an experimental model. This tries to choose a consistent and useful model for all for them. This does not try to do multi-factor, interacting, nor dependent variable models, if you want those do them yourself and pass them off as alt_model.
choose_model(
input,
conditions = NULL,
batches = NULL,
model_batch = TRUE,
model_cond = TRUE,
model_intercept = FALSE,
alt_model = NULL,
alt_string = NULL,
intercept = 0,
reverse = FALSE,
contr = NULL,
surrogates = "be",
verbose = TRUE,
...
)
input |
Input data used to make the model. |
conditions |
Factor of conditions in the putative model. |
batches |
Factor of batches in the putative model. |
model_batch |
Try to include batch in the model? |
model_cond |
Try to include condition in the model? (Yes!) |
model_intercept |
Use an intercept model instead of cell-means? |
alt_model |
Use your own model. |
alt_string |
String describing an alternate model. |
intercept |
Choose an intercept for the model as opposed to 0. |
reverse |
Reverse condition/batch in the model? This shouldn't/doesn't matter but I wanted to test. |
contr |
List of contrasts.arg possibilities. |
surrogates |
Number of or method used to choose the number of surrogate variables. |
verbose |
Print some information about what is happening? |
... |
Further options are passed to arglist. |
Invoked by the _pairwise() functions.
List including a model matrix and strings describing cell-means and intercept models.
[stats::model.matrix()]
## Not run:
a_model <- choose_model(expt, model_batch = TRUE, model_intercept = FALSE)
a_model$chosen_model
## ~ 0 + condition + batch
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.