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).
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)
Value of the smoothing parameter.
Vector of data for the independent variable. The object is coerced to class circular.
Vector of data for the dependent variable. This must be same length as x.
Points where the regression function is estimated. If NULL, equally spaced points are used according to the parameters from, to and len.
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".
Degree of the local sine-polynomial to be used in the estimation process. It must be 1 or 3.
Character string indicating the conditional density to be used. It must be one of "gaussian", "bernoulli", "poisson" or "gamma".
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 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 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.
Tolerance parameter for convergence in the numerical estimation. Only needed if family is one of "bernoulli", "poisson" or "gamma". Default is tol = 0.00001.
Maximum number of iterations in the numerical estimation. Only needed if family is one of "bernoulli", "poisson" or "gamma". Default is maxit = 300.
Left and right-most points of the grid at which the density is to be estimated. The objects are coerced to class circular.
Number of equally spaced points at which the density is to be estimated.
Maria Alonso-Pena, Irene Gijbels and Rosa M. Crujeiras.
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.
Alonso-Pena, M., Gijbels, I. and Crujeiras, R.M. (2022). A general framework for circular local likelihood regression. Under review.
circ.local.lik
# \donttest{
data(spikes)
direction<-circular(spikes$direction,units="degrees")
counts<-spikes$counts
bw.circ.local.lik(direction, counts, rule = "refined", p=1, family="poisson")
# }
Run the code above in your browser using DataLab