0
$\begingroup$

Just wondering, is there a function that depends and a small number of parameters and can model these 3 scenarios (depending on the chosen parameters):

enter image description here

The first is a constant, the second a log-normal (?) and the 3rd a decay function. Thanks!

$\endgroup$
2
  • $\begingroup$ @NiklasvMoers thanks. This has to be purely data driven. I do not want to learn the "decision" as to which function to chose, if that makes sense? Mind you whether to have the constant or the other 2 functions depends on a 2 level factor IV. $\endgroup$
    – cs0815
    Commented Jun 6, 2020 at 10:00
  • $\begingroup$ I deleted my comment and gave an explicit formula to transform between two functions. Is that more in the lines of what you're looking for? $\endgroup$ Commented Jun 6, 2020 at 10:07

1 Answer 1

1
$\begingroup$

Let's say you have two functions $f_0, f_1: \mathbb{R} \rightarrow \mathbb{R}$. Then you have a continuous deformation ("homotopy") between those two functions given by $$ f: \mathbb{R} \times [0,1] \rightarrow \mathbb{R}, f(x, t) := (1-t) f_0(x) + t f_1(x). $$ It has the property $f(x, 0) = f_0(x)$ and $f(x, 1) = f_1(x)$. This generalizes easily to any number of functions.

Edit: I thought of another way without case distintion to generalize this to any number of cases: Define the standard-n-simplex $\Delta^n$ by $$ \{ (t_0, t_1, ..., t_n) \in \mathbb{R}^{n+1} \mid t_i \geq 0, \sum t_i = 1 \}.$$ Then you can define your "homotopy" function $f$ by

$$f: \mathbb{R} \times \Delta^n \rightarrow \mathbb{R}, f(x, (t_0, t_1, ..., t_n)) := \sum\limits_i t_i f_i(x). $$ This looks kind of complicated, but you can imagine it like this: The closer you go to a vertex of your simplex (e.g. your triangle), the closer you go to one of your function $f_i$.

$\endgroup$
3
  • $\begingroup$ thanks. the solution of using t is exactly what I need. I also just realized that the log normal can be like a decay function. Thanks! You say this generalizes to any number of functions. In fact, I have the 2 factors. One with 2 levels (like I described) and another with 12 levels (months). The 2 level one determines whether it is a constant or not. The amplitude and shape of the other functions depend on the month. $\endgroup$
    – cs0815
    Commented Jun 6, 2020 at 10:14
  • 1
    $\begingroup$ The way that this generalizes is that you consider $f: \mathbb{R} \times [0, n] \rightarrow \mathbb{R}$ and make a case distinction in which interval $[i, i+1]$ your parameter $t$ is where $i$ is a natural number. $\endgroup$ Commented Jun 6, 2020 at 10:20
  • 1
    $\begingroup$ great generalization thanks. $\endgroup$
    – cs0815
    Commented Jun 6, 2020 at 10:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .