findModel | R Documentation |
Returns the index of the wished model if it is present in the model
list, and otherwise returns NA
.
findModel(model, BayesMfpObject)
model |
the specific model: a list with entries |
BayesMfpObject |
an object of class |
See BayesMfp
for the description of a model.
Index of model
in BayesMfpObject
if it is present in the
model list, otherwise NA
.
The searched model must have exactly the same construction as the
models in BayesMfpObject
. See the example below for the
recommended use.
## construct a BayesMfp object set.seed(92) x1 <- rnorm (15) x2 <- rbinom (n=15, size=20, prob=0.6) x3 <- rexp (15) y <- rt (15, df=2) test <- BayesMfp (y ~ bfp (x2, max = 4) + uc (x1 + x3), nModels=2000, method="exhaustive") ## copy one model myModel <- test[[1]] ## and modify it! myModel$powers[["x2"]] <- c (1, 2) stopifnot(identical(findModel (myModel, test), 31L))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.