Description Usage Arguments Details Value Functions Examples
Functions for modelbuilding \n
build_model
: takes the riverdata, handles the other functions and
invokes stan_lm
1 2 3 4 5 6 7 8 | build_model(riverdata, variables = ask_for_variables(riverdata),
with_interaction = TRUE)
ask_for_variables(riverdata)
process_model_riverdata(riverdata, variables)
create_formula(variables, with_interaction = FALSE)
|
riverdata |
a list with riverdata (hygiene + physical data) |
variables |
character. Selected variables for the model |
with_interaction |
logical. Formula with interactions? Default set to TRUE |
Build the model from hygiene data and physical data like flow, rain,
wwtp. Asks for user input to select variables. Computes the data.frame with
data for hygiene and chosen variables and creates a formula of the form:
Q*(K + R)
while multiple Qs will be multiplied, multiple Ks and Rs
will be added.
Returns a model of the riverdata.
Returns a character-vector with the chosen model variables
Returns a data.frame with data for hygiene and chosen variables
Returns parsed model-formula. (Like model$formula)
ask_for_variables
: Internal function. Quite time consuming
process_model_riverdata
: Internal usage
create_formula
: Internal usage
1 2 3 4 5 6 7 | ## Not run: variables <- c("e.coli","q_havel",...)
lm(formula = eval(create_formula(variables)),
data = process_model_riverdata(riverdata, variables))
## End(Not run)
create_formula(c("log_e.coli","q_havel","ka_ruhleben","r_berlin"))
create_formula(c("e.coli","r_mitte","r_charlottenburg","r_spandau"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.