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"
)

Arguments

mean_fun

List of mean functions to create data frame of models from.

err_dist

List of error distributions to create data frame of models from.

mean_class

Class of mean functions to create data frame of models from (optional).

err_class

Class of error distributions to create data frame of models from (optional).

binomial_n

Value of binomial n parameter for binomial models (optional).

method

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.

Value

Data frame contaning the mean functions, error distribution, and binomial n parameter of all created models.

Examples


## 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