a2a
was designed to avoid headaches that are likely to occur when
working with different formulations of the binomial power law analysis.
Arguments
- x
Intercept parameter to be converted or a named list with the parameter to be converted ("Ai", "ai", "AI" or "aI"), the slope ("slope"), and the number of individual per sampling unit ("n").
- ...
Additional arguments to be passed to other methods.
- slope
Slope parameter.
- n
Number of individuals per sampling unit.
- from
Kind of the input intercept parameter ("Ai", "ai", "AI" or "aI").
- to
Desired kind for the ouput intercept parameter ("Ai", "ai", "AI" or "aI").
Details
The binomial power law can be expressed as: \(s_y^2 = (intercept)(s_{bin}^2)^b\). But different forms of (intercept) are possible depending on the formulation of the binomial power law.
Ai | ai | AI | aI | |
Ai | 1 | n^b | n^(2(b-1)) | n^(b-2) |
ai | n^(-b) | 1 | n^(b-2) | n^(-2) |
AI | n^(2(1-b)) | n^(2-b) | 1 | n^(-b) |
aI | n^(2-b) | n^2 | n^b | 1 |
Examples
# Values from the power_law() example:
Ai <- 38.6245
slope <- 1.9356
n <- 9
# Usual function call syntax:
a2a(Ai, slope, n, from = "Ai", to = "ai")
#> 0.5493272
# Other syntaxes:
inputs <- list(Ai = Ai, slope = slope, n = n)
a2a(inputs, "ai")
#> 0.5493272
require(magrittr)
#> Loading required package: magrittr
inputs %>% a2a("ai")
#> 0.5493272