Skip to contents

Additional families compatible with sdmTMB().

Usage

Beta(link = "logit")

lognormal(link = "log")

gamma_mix(link = "log")

lognormal_mix(link = "log")

nbinom2(link = "log")

nbinom1(link = "log")

truncated_nbinom2(link = "log")

truncated_nbinom1(link = "log")

student(link = "identity", df = 3)

tweedie(link = "log")

censored_poisson(link = "log")

delta_gamma(link1 = "logit", link2 = "log")

delta_gamma_mix(link1 = "logit", link2 = "log")

delta_lognormal(link1 = "logit", link2 = "log")

delta_lognormal_mix(link1 = "logit", link2 = "log")

delta_truncated_nbinom2(link1 = "logit", link2 = "log")

delta_truncated_nbinom1(link1 = "logit", link2 = "log")

delta_poisson_link_gamma(link1 = "log", link2 = "log")

delta_poisson_link_lognormal(link1 = "log", link2 = "log")

delta_beta(link1 = "logit", link2 = "logit")

Arguments

link

Link.

df

Student-t degrees of freedom fixed value parameter.

link1

Link for first part of delta/hurdle model.

link2

Link for second part of delta/hurdle model.

Value

A list with elements common to standard R family objects including family, link, linkfun, and linkinv.

Details

The families ending in _mix() are 2-component mixtures where each distribution has its own mean but a shared scale parameter.

The nbinom2 negative binomial parameterization is the NB2 where the variance grows quadratically with the mean (Hilbe 2011).

The nbinom1 negative binomial parameterization lets the variance grow linearly with the mean (Hilbe 2011).

For student(), the degrees of freedom parameter is currently not estimated and is fixed at df.

delta_poisson_link_gamma() is the Poisson-link (complementary log-log) delta model (Thorson 2018).

delta_poisson_link_lognormal() is the Poisson-link (complementary log-log) delta model (Thorson 2018).

References

Hilbe, J. M. (2011). Negative binomial regression. Cambridge University Press.

Thorson, J. T. (2018). Three problems with the conventional delta-model for biomass sampling data, and a computationally efficient alternative. Canadian Journal of Fisheries and Aquatic Sciences, 75(9), 1369-1382. doi:10.1139/cjfas-2017-0266

Examples

Beta(link = "logit")
#> 
#> Family: Beta 
#> Link function: logit 
#> 
lognormal(link = "log")
#> 
#> Family: lognormal 
#> Link function: log 
#> 
gamma_mix(link = "log")
#> 
#> Family: gamma_mix 
#> Link function: log 
#> 
lognormal_mix(link = "log")
#> 
#> Family: lognormal_mix 
#> Link function: log 
#> 
nbinom2(link = "log")
#> 
#> Family: nbinom2 
#> Link function: log 
#> 
nbinom1(link = "log")
#> 
#> Family: nbinom1 
#> Link function: log 
#> 
truncated_nbinom2(link = "log")
#> $family
#> [1] "truncated_nbinom2"
#> 
#> $link
#> [1] "log"
#> 
#> $linkfun
#> function (mu) 
#> log(mu)
#> <environment: namespace:stats>
#> 
#> $linkinv
#> function (eta) 
#> pmax(exp(eta), .Machine$double.eps)
#> <environment: namespace:stats>
#> 
truncated_nbinom1(link = "log")
#> $family
#> [1] "truncated_nbinom1"
#> 
#> $link
#> [1] "log"
#> 
#> $linkfun
#> function (mu) 
#> log(mu)
#> <environment: namespace:stats>
#> 
#> $linkinv
#> function (eta) 
#> pmax(exp(eta), .Machine$double.eps)
#> <environment: namespace:stats>
#> 
student(link = "identity")
#> 
#> Family: student 
#> Link function: identity 
#> 
tweedie(link = "log")
#> 
#> Family: tweedie 
#> Link function: log 
#> 
censored_poisson(link = "log")
#> $family
#> [1] "censored_poisson"
#> 
#> $link
#> [1] "log"
#> 
#> $linkfun
#> function (mu) 
#> log(mu)
#> <environment: namespace:stats>
#> 
#> $linkinv
#> function (eta) 
#> pmax(exp(eta), .Machine$double.eps)
#> <environment: namespace:stats>
#> 
delta_gamma()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#> 
#> [[2]]
#> 
#> Family: Gamma 
#> Link function: log 
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "logit" "log"  
#> 
#> $family
#> [1] "binomial" "Gamma"   
#> 
#> $clean_name
#> [1] "delta_gamma(link1 = 'logit', link2 = 'log')"
#> 
delta_gamma_mix()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#> 
#> [[2]]
#> 
#> Family: gamma_mix 
#> Link function: log 
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "logit" "log"  
#> 
#> $family
#> [1] "binomial"  "gamma_mix"
#> 
#> $clean_name
#> [1] "delta_gamma_mix(link1 = 'logit', link2 = 'log')"
#> 
delta_lognormal()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#> 
#> [[2]]
#> 
#> Family: lognormal 
#> Link function: log 
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "logit" "log"  
#> 
#> $family
#> [1] "binomial"  "lognormal"
#> 
#> $clean_name
#> [1] "delta_lognormal(link1 = 'logit', link2 = 'log')"
#> 
delta_lognormal_mix()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#> 
#> [[2]]
#> 
#> Family: lognormal 
#> Link function: log 
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "logit" "log"  
#> 
#> $family
#> [1] "binomial"      "lognormal_mix"
#> 
#> $clean_name
#> [1] "delta_lognormal_mix(link1 = 'logit', link2 = 'log')"
#> 
delta_truncated_nbinom2()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#> 
#> [[2]]
#> [[2]]$family
#> [1] "truncated_nbinom2"
#> 
#> [[2]]$link
#> [1] "log"
#> 
#> [[2]]$linkfun
#> function (mu) 
#> log(mu)
#> <environment: namespace:stats>
#> 
#> [[2]]$linkinv
#> function (eta) 
#> pmax(exp(eta), .Machine$double.eps)
#> <environment: namespace:stats>
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "logit" "log"  
#> 
#> $family
#> [1] "binomial"          "truncated_nbinom2"
#> 
#> $clean_name
#> [1] "delta_truncated_nbinom2(link1 = 'logit', link2 = 'log')"
#> 
delta_truncated_nbinom1()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#> 
#> [[2]]
#> [[2]]$family
#> [1] "truncated_nbinom1"
#> 
#> [[2]]$link
#> [1] "log"
#> 
#> [[2]]$linkfun
#> function (mu) 
#> log(mu)
#> <environment: namespace:stats>
#> 
#> [[2]]$linkinv
#> function (eta) 
#> pmax(exp(eta), .Machine$double.eps)
#> <environment: namespace:stats>
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "logit" "log"  
#> 
#> $family
#> [1] "binomial"          "truncated_nbinom1"
#> 
#> $clean_name
#> [1] "delta_truncated_nbinom1(link1 = 'logit', link2 = 'log')"
#> 
delta_poisson_link_gamma()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: log 
#> 
#> 
#> [[2]]
#> 
#> Family: Gamma 
#> Link function: log 
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "log" "log"
#> 
#> $family
#> [1] "binomial" "Gamma"   
#> 
#> $type
#> [1] "poisson_link_delta"
#> 
#> $clean_name
#> [1] "delta_poisson_link_gamma(link1 = 'log', link2 = 'log')"
#> 
delta_poisson_link_lognormal()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: log 
#> 
#> 
#> [[2]]
#> 
#> Family: lognormal 
#> Link function: log 
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "log" "log"
#> 
#> $family
#> [1] "binomial"  "lognormal"
#> 
#> $type
#> [1] "poisson_link_delta"
#> 
#> $clean_name
#> [1] "delta_poisson_link_lognormal(link1 = 'log', link2 = 'log')"
#> 
delta_beta()
#> [[1]]
#> 
#> Family: binomial 
#> Link function: logit 
#> 
#> 
#> [[2]]
#> 
#> Family: Beta 
#> Link function: logit 
#> 
#> 
#> $delta
#> [1] TRUE
#> 
#> $link
#> [1] "logit" "logit"
#> 
#> $family
#> [1] "binomial" "Beta"    
#> 
#> $clean_name
#> [1] "delta_beta(link1 = 'logit', link2 = 'logit')"
#>