bw.circ.local.lik: Smoothing parameter selection for circular local likelihood...

View source: R/bw.circ.local.lik.R

bw.circ.local.likR Documentation

Smoothing parameter selection for circular local likelihood regression

Description

Function bw.circ.local.lik computes values of the smoothing (concentration) parameter for local likelihood regression when the predictor is circular and the conditional density is either gaussian, Bernoulli, Poisson or gamma. The smoothing parameter can be selected by the refined rule, the CRSC rule or cross-validation, as described in Alonso-Pena et al. (2022).

Usage

bw.circ.local.lik(x, y, t, rule = NULL, p, family, startv = NULL,
  lower = 0, upper = 50, lower_ast = 0, upper_ast = 15, tol = 0.00001,
  maxit = 300, from = circular(0), to = circular(2 * pi), len = 250)

Arguments

x

Vector of data for the independent variable. The object is coerced to class circular.

y

Vector of data for the dependent variable. This must be same length as x.

t

Points where the regression function is estimated. If NULL, equally spaced points are used according to the parameters from, to and len.

rule

Character string giving the rule to be used to select the smoothing (concentration) parameter. This must be one of "refined" (only for p = 1), "CRSC" or "cv".

p

Degree of the local sine-polynomial to be used in the estimation process. It must be 1 or 3.

family

Character string indicating the conditional density to be used. It must be one of "gaussian", "bernoulli", "poisson" or "gamma".

startv

Vector containing the initial values for the estimation algorithm if family is set as "bernoulli", "poisson" or "gamma". The vector must be of length 2 if p = 1 and length 4 if p = 3. If NULL, the initial parameters are the ones corresponding to the global mean of the responses.

lower, upper

Lower and upper boundary of the interval to be used in the search for the value of the smoothing parameter. Default lower = 0 and upper = 50.

lower_ast, upper_ast

Lower and upper boundary of the interval to be used in the search for the value of the pilot smoothing parameter in the refined rule. Default lower_ast = 0 and upper_ast = 15.

tol

Tolerance parameter for convergence in the numerical estimation. Only needed if family is one of "bernoulli", "poisson" or "gamma". Default is tol = 0.00001.

maxit

Maximum number of iterations in the numerical estimation. Only needed if family is one of "bernoulli", "poisson" or "gamma". Default is maxit = 300.

from, to

Left and right-most points of the grid at which the density is to be estimated. The objects are coerced to class circular.

len

Number of equally spaced points at which the density is to be estimated.

Details

For the refined rule, which is only available for p = 1, first a pilot concentration parameter is selected with the (E)CRSC rule using a sine-polynomial of degree 3, where the search is conducted between the values lower_ast and upper_ast. With the pilot smoothing parameter, the MISE of the estimator is approximated and the refined rule selects the parameter which minimizes the approximated MISE.

The CRSC rule selects the parameter minimizing the Circular Residual Squares Criterion if family = "gaussian" and the Extended Circular Residual Squares Criterion in the other cases.

The cv rule performs a cross-validation search.

See Alonso-Pena et al. (2022) for more details.

Value

Value of the smoothing parameter.

Author(s)

Maria Alonso-Pena, Irene Gijbels and Rosa M. Crujeiras.

References

Alonso-Pena, M., Gijbels, I. and Crujeiras, R.M. (2022). A general framework for circular local likelihood regression. Under review.

See Also

circ.local.lik

Examples


data(spikes)
direction<-circular(spikes$direction,units="degrees")
counts<-spikes$counts
bw.circ.local.lik(direction, counts, rule = "refined", p=1, family="poisson")


NPCirc documentation built on Nov. 10, 2022, 5:48 p.m.