### Description

This function evaluates the gradient of the objective function for the spectral density local maximum likelihood estimator.

### Usage

grad(x, omega, l_period, n, freq, h)


### Arguments

 x Current estimate omega Frequency at which the spectral density estimate is evaluated. l_period Vector of length n with the log-periodogram evaluations at the n Fourier frequencies. n Number of points in the analyzed lattice. freq n \times 2 matrix with the n Fourier frequencies. h Kernel bandwidth.

### Details

In scICA function the maximization for the spectral density local maximum likelihood estimator is obtained through the Newton-Raphson algorithm. This function returns the gradient needed in the optimization method. See locmulti for further details.

### Value

It returns a gradient vector of length 3.

### Note

It is auxiliary for scICA function.

### Author(s)

Lee, S., Shen, H., Truong, Y. and Zanini, P.

scICA, locmulti, kern.