log_link object provides a way to implement logit link function that
maxlogL needs to perform estimation. See documentation for
maxlogL for further information on parameter estimation and implementation
of link objects.
logit_link is part of a family of generic functions with no input arguments that
defines and returns a list with details of the link function:
name: a character string with the name of the link function.
g: implementation of the link function as a generic function in
g_inv: implementation of the inverse link function as a generic function
There is a way to add new mapping functions. The user must specify the details aforesaid.
A list with logit link function, its inverse and its name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# Estimation of proportion in binomial distribution with 'logit' function # 10 trials, probability of success equals to 30%) N <- rbinom(n = 100, size = 10, prob = 0.3) phat <- maxlogL(x = N, dist = 'dbinom', fixed = list(size=10), link = list(over = "prob", fun = "logit_link")) summary(phat) # Link function name fun <- logit_link()$name print(fun) # Link function g <- logit_link()$g curve(g(x), from = 0, to = 1) # Inverse link function ginv <- logit_link()$g_inv curve(ginv(x), from = -10, to = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.