Description Usage Arguments Details Value Author(s) See Also Examples
makeFormula is an internal biomod2 function that can be useful to help users to build easily some standardized formula used later by statistical models.
1 2 3 4 5 | makeFormula(respName,
explVar,
type = 'simple',
interaction.level = 0,
...)
|
respName |
a |
explVar |
a |
type |
either 'simple', 'quadratic', 'polynomial' or 's_smoother' defining the type of formula you want to build |
interaction.level |
an |
... |
some additional arguments (see details) |
It's advise to give only a subset of explVar
table to avoid useless memory consuming. If some explanatory variables are factorial ones, you have to give a data.frame
for explVar
where associated columns are define as factor
.
...
argument availables values are :
k the smooting parameter value (used only if type = 's_smoother'
) corespunding to k
parameter of mgcv s
or df
gam s
arguments.
A link[stats]{formula}
class object that can be directly given to most of R statistical models.
Damien Georges
BIOMOD_ModelingOptions
, link[stats]{formula}
1 2 3 4 5 6 7 8 9 10 11 | # create simulated data
myResp <- sample(c(0,1),20, replace=TRUE)
myExpl <- matrix(runif(60), ncol=3, dimnames=list(NULL,c('var1','var2','var3')))
# create a formula
myFormula <- makeFormula( respName = 'myResp',
explVar = head(myExpl),
type = 'quadratic',
interaction.level = 0)
# show formula created
myFormula
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.