Skip to content

Instantly share code, notes, and snippets.

@twolodzko
Created August 5, 2017 19:14
Show Gist options
  • Save twolodzko/be4120e5b173738d5091745f07630801 to your computer and use it in GitHub Desktop.
Save twolodzko/be4120e5b173738d5091745f07630801 to your computer and use it in GitHub Desktop.
example of logistic growth curve
# use RStudio
library(manipulate)
lgrowth <- function(x, a, b, c) a/(1+exp(-(b+c*x)))
manipulate(
curve(lgrowth(x, a, b, c), -4, 4, ylim = c(-1, 2)),
a = slider(-2, 2, initial = 1, step = 0.01),
b = slider(-2, 2, initial = 0, step = 0.01),
c = slider(-2, 2, initial = 1, step = 0.01)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment