View source: R/bm_MakeFormula.R
bm_MakeFormula | R Documentation |
This internal biomod2 function allows the user to create easily a standardized formula that can be used later by statistical models.
bm_MakeFormula(
resp.name,
expl.var,
type = "simple",
interaction.level = 0,
k = NULL
)
resp.name |
a |
expl.var |
a |
type |
a |
interaction.level |
an |
k |
(optional, default |
It is advised to give only a subset of expl.var
table to avoid useless memory consuming.
If some explanatory variables are factorial, expl.var
must be a data.frame
whose corresponding columns are defined as factor
.
A formula
class object that can be directly given to most of
R statistical models.
Damien Georges
formula
, s
, s
,
bm_ModelingOptions
, bm_Tuning
,
bm_RunModelsLoop
Other Secundary functions:
bm_BinaryTransformation()
,
bm_CrossValidation()
,
bm_FindOptimStat()
,
bm_ModelingOptions()
,
bm_PlotEvalBoxplot()
,
bm_PlotEvalMean()
,
bm_PlotRangeSize()
,
bm_PlotResponseCurves()
,
bm_PlotVarImpBoxplot()
,
bm_PseudoAbsences()
,
bm_RunModelsLoop()
,
bm_SRE()
,
bm_SampleBinaryVector()
,
bm_SampleFactorLevels()
,
bm_Tuning()
,
bm_VariablesImportance()
## Create simple simulated data
myResp.s <- sample(c(0, 1), 20, replace = TRUE)
myExpl.s <- data.frame(var1 = sample(c(0, 1), 100, replace = TRUE),
var2 = rnorm(100),
var3 = 1:100)
## Generate automatic formula
bm_MakeFormula(resp.name = 'myResp.s',
expl.var = head(myExpl.s),
type = 'quadratic',
interaction.level = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.