Create data frame of models to fit. Models will be formed by either pairing or crossing the elements of the mean function and error distribution parameters vector.
set_models(
mean_fun = NULL,
err_dist = NULL,
mean_class = NULL,
err_class = NULL,
binomial_n = NA,
method = "crossed"
)
List of mean functions to create data frame of models from.
List of error distributions to create data frame of models from.
Class of mean functions to create data frame of models from (optional).
Class of error distributions to create data frame of models from (optional).
Value of binomial n parameter for binomial models (optional).
Method of combining the mean functions and error distributions; "crossed" results in all possible mean function / error distribution combinations; "paired" matches the ith mean functions with the ith error distribution.
Data frame contaning the mean functions, error distribution, and binomial n parameter of all created models.
## Create all possible models with supplied mean functions and error distributions
set_models(mean_fun=c("beta","sech"), err_dist=c("zip","zinb"), method="crossed")
#> mean_fun err_dist binomial_n
#> 1 beta zip NA
#> 2 beta zinb NA
#> 3 sech zip NA
#> 4 sech zinb NA
## Combine mean functions and error distributions directly
set_models(mean_fun=c("beta","sech"), err_dist=c("zip","zinb"), method="paired")
#> mean_fun err_dist binomial_n
#> 1 beta zip NA
#> 2 sech zinb NA
## Create a model with a binomial n parameter
set_models(mean_fun=c("beta","sech"), err_dist=c("zip","binomial.count"), binomial_n=40)
#> mean_fun err_dist binomial_n
#> 1 beta zip NA
#> 2 beta binomial.count 40
#> 3 sech zip NA
#> 4 sech binomial.count 40