score.coeff: Fourier coefficients of the score in a location model

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Beran_estimator.R

Description

Estimates the Fourier coefficients of the scores in a location shift model, with is the class of densities obtained by a location shift of a fixed unknown density f. The score, given by

φ'(x)=-f'\circ F^{-1}(t)/f\circ F^{-1}(x),

does not depend on the unknown shift. The Fourier coefficients of the score is estimated from the data, whose density is assumed to be a location shift of the unknown density f. We use Beran (1974)'s nonparametric estimator here.

Usage

1
score.coeff(x, theta, indices, which)

Arguments

x

An array of length n; represents the data from a location model whose score the Fourier coefficients seek to estimate.

theta

A small number, should be of order O_p(n^{-1/2}). The default is 4n^{-1/2}

indices

An array of positive integers, for each integer j in "indices", Fourier coefficient corresponding to the basis function t\mapsto\exp(i2π jt) is computed.

which

Optional. Takes value 1 or 2. If "which" is 1, only the real part of the Fourier coefficient is computed. If "which" is 2, only the imaginary part of the k-th coefficient is calculated. The default is to calculate both real and imaginary parts.

Details

theta: theta do not need to depend on the range of the data because the estimators depend only on the rank of the dataponts. If theta=z_n which equals z n^{-1/2}, then the estimated coefficients are root-n consistent by Theorem 2.1 of Beran (1974).

which: If it is known that the density f is symmetric, then the Fourier coefficients are real. Therefore, there is no need to calculate the imaginary part. Similarly, if the density is odd, then the Fourier coefficinets of the scores are purely imaginary. Otherwise, one generally requires both the real and the imaginary parts, and "which" should be left unspecified in those cases.

Value

Author(s)

Nilanjana Laha (maintainer), nlaha@hsph.harvard.edu.

References

Beran, R. (1974). Asymptotically efficient adaptive rank estimates in location models. Ann. Statist., 2, 63-74.

Examples

1
x <- rnorm(100); score.coeff(x, length(x)^(-1/2), 1)

nilanjanalaha/log.location documentation built on Dec. 31, 2020, 12:07 a.m.