I am struggling to model the correlation shown in the figure so that I can predict the positive values of y beyond the observed range:
The correlation between y and x appears oscillatory and characterised by:
- increasing amplitude;
- increasing period;
- asymmetric oscillations.
I was able to define functions that satisfy some of these features, but I could not find a function that satisfies all these features at once. Can you help me do it?
Here is what I was able to accomplish so far, using R:
A function characterised by increasing amplitude
x <- seq(0, 10, by=0.01)
a = 9 # controls amplitude change rate
b = 1.2 # controls frequency change rate
y <- x*b*sin(x*a) # increasing amplitude
The grey line shows what I am attempting to model, the red line is the function in the graph title.
A function characterised by increasing amplitude and period
b = 1.2 # b controls rate of amplitude increase
g = 10
h = 200
# g and h control rate of period increase
y4 <- x*b*sin(exp(g-x)/h)
This function goes flat by x~7.
The grey line shows what I am attempting to model, the red line is the function in the graph title.
A function characterised by asymmetric oscillations
I was able to model this with a modified Clausen function of order 2:
d=4.5 # changes frequency
f=2 # changes amplitude
clausen2 <- f*sin(x*d) + f*sin(2*x*d)/4 + f*sin(3*x*d)/(3^2) + f*sin(4*x*d)/(4^2) +
f*sin(5*x*d)/(5^2) + f*sin(6*x*d)/(6^2) + f*sin(7*x*d)/(7^2) + f*sin(8*x*d)/(8^2) +
f*sin(9*x*d)/(9^2)
The grey line shows what I am attempting to model, the red line is the function in the graph title.
I am not sure if I am overcomplicating things and/or missing something obvious.






