| get_est_Ar {rbbnp} | R Documentation |
get the estimation of A and r
Description
This function estimates the parameters A and r by optimizing an objective function over a specified range of frequency values and r values.
Usage
get_est_Ar(Y = 1, X, xi_interval, r_stepsize = 150)
Arguments
Y |
A numerical vector representing the sample data of variable Y. |
X |
A numerical vector representing the sample data of variable X. |
xi_interval |
A list with elements |
r_stepsize |
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. |
Details
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.
Value
A named vector with elements est_A and est_r representing the estimated
values of A and r, respectively.