| generate_eta | R Documentation |
Produces a numeric vector of eta values to be used in Cox–KL model.
generate_eta(method = "exponential", n = 10, max_eta = 5, min_eta = 0)
method |
Character string selecting how to generate |
n |
Integer, the number of |
max_eta |
Numeric, the maximum value of |
min_eta |
Numeric, the minimum value of |
Exponential: values are formed by exponentiating a grid from
log(1) to log(100), then linearly rescaling to the interval
[0, max_eta]. Thus the smallest value equals 0 and the largest
equals max_eta.
Linear: the current implementation calls
seq(min_eta, max_eta, length.out = n) and therefore assumes a
numeric object min_eta exists in the calling environment.
Only the exact strings “linear” and “exponential” are supported;
other values for method will result in an error because eta_values
is never created.
Numeric vector of length n containing the generated eta values.
# Generate 10 exponentially spaced eta values up to 5
generate_eta(method = "exponential", n = 10, max_eta = 5)
# Generate 5 linearly spaced eta values up to 3
generate_eta(method = "linear", n = 5, max_eta = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.