Family objects provide a convenient way to specify the details of the models used by pareg. See also stats::family for more details.

family(object, ...)

gaussian(link = c("identity"))

bernoulli(link = c("logit", "probit", "log"))

beta(link = c("logit", "probit", "log"))

beta_phi_lm(link = c("logit", "probit", "log"))

beta_phi_var(link = c("logit", "probit", "log"))

Arguments

object

a object for which the family shoulr be retured (e.g. edgenet)

...

further arguments passed to methods

link

name of a link function

Value

An object of class pareg.family

family

name of the family

link

name of the link function

linkinv

inverse link function

loss

loss function

Examples

gaussian()
#> $family
#> [1] "gaussian"
#> 
#> $link
#> [1] "identity"
#> 
#> $linkfun
#> NULL
#> 
#> $linkinv
#> function (x) 
#> x
#> <bytecode: 0x7fd2f5be1498>
#> <environment: namespace:pareg>
#> 
#> $loss
#> function (y, mu.hat, ...) 
#> {
#>     obj <- tf$reduce_mean(tf$square(y - mu.hat))
#>     obj
#> }
#> <bytecode: 0x7fd2f5be0900>
#> <environment: namespace:pareg>
#> 
#> $secondary_linkinv
#> NULL
#> 
#> attr(,"class")
#> [1] "pareg.family"
bernoulli("probit")$link
#> [1] "probit"
beta()$loss
#> function (y, mu_hat, phi_hat, ...) 
#> {
#>     beta.loss(y, mu_hat, tf$ones(tf$shape(mu_hat)), ...)
#> }
#> <bytecode: 0x7fd30aec0800>
#> <environment: 0x7fd2f8785c48>