set_models: Set models

set_modelsR Documentation

Set models

Description

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.

Usage

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

## Combine mean functions and error distributions directly
set_models(mean_fun=c("beta","sech"), err_dist=c("zip","zinb"), method="paired")

## Create a model with a binomial n parameter
set_models(mean_fun=c("beta","sech"), err_dist=c("zip","binomial.count"), binomial_n=40)


PRIMER-e/senlm documentation built on Nov. 20, 2022, 2:38 a.m.