# Diminishing Returns ####
# Function
dimrets_function <- function(x, a, b){
b * ( 1 - exp( -x / a ) )
}
# Gradient (Negative)
dimrets_gradient <- function(x, a, b){
-( ( ( b / a ) * exp( -(x/a) ) ) )
}
# Net Diminishing Returns
# Function
net_dimrets_function <- function(x, a, b){
b * ( 1 - exp( -x / a ) ) - x
}
# Gradient (Negative)
net_dimrets_gradient <- function(x, a, b){
-( ( ( b / a ) * exp( -(x/a) ) ) ) + 1
}
# S-Curve ####
# Function
s_curve_function <- function(x, a, b, c, d){
b * ( x / a )^c / ( ( x / a )^c + d )
}
# Gradient (Negative)
s_curve_gradient <- function(x, a, b, c, d){
-( b * c * d * ( x / a )^c ) / ( x * ( ( x / a )^c + d )^2 )
}
# Net S-Curve
# Function
net_s_curve_function <- function(x, a, b, c, d){
b * ( x / a )^c / ( ( x / a )^c + d ) - x
}
# Gradient (Negative)
net_s_curve_gradient <- function(x, a, b, c, d){
- ( b * c * d * ( x / a )^c ) / ( x * ( ( x / a )^c + d )^2 ) + 1
}
# Linear ####
# Function
linear_function <- function(x, a){
a * x
}
# Gradient (Negative)
linear_gradient <- function(x, a){
- a
}
# Net Linear
# Function
net_linear_function <- function(x, a){
a * x - x
}
# Gradient (Negative)
net_linear_gradient <- function(x, a){
- a + 1
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.