Description Usage Arguments Details Value Examples
Fits the specified model and returns a tibble containing model fit information.
1 |
model_array |
a tibble of objects retreived from the |
method |
the framework with which the model shoudl be fit provided as an unquoted
argument. Either |
model_data |
the data frame or tibble containing the variables of the model |
outcome |
the name of the varaible to act as the dependent variable of the model specified as an expression |
group |
teh name of teh variable to act as the grouping variable of the data specified as an expression. |
opt |
additional model options provided as a fucntion call to |
Currently, only the binomial distribution is supported within the Bayesian
and random forest frameworks. All models with a specific make_distribution()
function can be fit within a Frequentist framework. Priors must be set before
fitting a model within a Bayesian framework.
If a grouping variable is specified then each model is fit separately to each group contained within the grouping variable.
A tibble contianing a model_results object (contains the given data set and the model fit), along with relevant information about the model including the distribution the model was fit to, what variable was set as the dependent variable, which group (if not NA) the results correpond to, and the formula for the model.
1 2 3 4 5 6 7 8 9 10 | trial_data <- tibble(w = runif(20, 0, 2), x = sample(c(1, 2), 20, TRUE),
y = rbinom(20, 1, .75), z = rbinom(20, 15, .5))
make_pois(1) %>% fit_model(frequentist, trial_data, z)
make_pois(w, x) %>% fit_model(frequentist, trial_data, z)
make_pois(w) %>% fit_model(frequentist, trial_data, z, x)
make_binom(1) %>% fit_model(frequentist, trial_data, y)
make_binom(w) %>% fit_model(frequentist, tiral_data, z, opt = model_options(max = 15))
make_binom(w) %>% set_priors(int = dnorm(0, .01), w = dunif(-100, 100)) %>%
fit_model(bayesian, trial_data, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.