Learn R Programming

opticut (version 0.1-3)

beta2i: Scaling for the Indicator Potential

Description

Transformation of estimated contrasts to indicator potential.

Usage

beta2i(x, scale = 1)

Value

Returns a numeric vector (I = abs(tanh(x * scale))).

Arguments

x

numeric, real valued coefficients.

scale

numeric, scaling constant.

Author

Peter Solymos <psolymos@gmail.com>

See Also

opticut and multicut use the scaled I values as indicator potential.

ocoptions for setting value for the default scaling factor.

Examples

Run this code
x <- seq(-5, 5, 0.1)
Col <- occolors(c("red", "blue"))(10)
plot(x, beta2i(x), type = "n")
s <- seq(1, 0.1, -0.1)
for (i in 1:10) {
    lines(x, beta2i(x, scale = s[i]), col = Col[i])
    text(1.5 - 0.2, beta2i(1.5, scale = s[i]), s[i], col = Col[i])
}

Run the code above in your browser using DataLab