This function estimates the parameters A and r by optimizing an objective function over a specified range of frequency values and r values.
get_est_Ar(Y = 1, X, xi_interval, r_stepsize = 150)A named vector with elements est_A and est_r representing the estimated
values of A and r, respectively.
A numerical vector representing the sample data of variable Y.
A numerical vector representing the sample data of variable X.
A list with elements xi_lb and xi_ub representing the lower
and upper bounds of the frequency interval.
An integer value representing the number of steps in the r range. This controls the granularity of the estimation. Higher values lead to finer granularity but increase computation time.
The function internally defines a range for the natural logarithm of frequency values (ln_xi_range)
and a range for the parameter r (r_range). It then defines an optimization function optim_ln_A
to minimize the integral of a given function over the ln_xi_range. The actual estimation is done by
finding the r and A value that minimizes the the area of the line \(\ln A - r \ln \xi\) under the constraint that the line should not go below the Fourier transform curve.