dpreg.circ: Joint parametric estimation of mean and dispersion functions...

View source: R/dpreg.circ.R

dpreg.circR Documentation

Joint parametric estimation of mean and dispersion functions in circular double Poisson models

Description

Function dpreg.circ implements the parametric joint estimator of the mean and dispersion functions when the covariate is circular and the conditional distribution is a double Poisson, a particular case of the double exponential family. It is assumed that the logarithm of the mean and the logarithm of the dispersion are sums of sine and cosine terms.

Usage

dpreg.circ(x, y, k = 2, ktilde = 1, startvmu = NULL, startvgam = NULL,
          tol= 0.000001, maxit = 300)

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 and should contain counts.

k

Number of components for modeling the logarithm of the mean, including the intercept. Equivalent to the number of parameters to be estimated for the mean function.

ktilde

Number of components for modeling the logarithm of the dispersion, including the intercept. Equivalent to the number of parameters to be estimated for the dispersion function.

startvmu

Vector of length k containing the initial values for the parameters corresponding to the estimation of the mean.

startvgam

Vector of length ktilde containing the initial values for the parameters corresponding to the estimation of the dispersion.

tol

Tolerance parameter for convergence in the numerical estimation.

maxit

Maximum number of iterations in the numerical estimation.

Details

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

Value

A list containing the following components:

datax, datay

Original dataset.

coefficients_mu

A vector of length k containing the estimators for the parameters corresponding to the mean.

coefficients_mu

A vector of length ktilde containing the estimators for the parameters corresponding to the dispersion.

numit

Number of iterations needed for convergence.

n

The sample size after elimination of missing values.

call

The call which produced the result.

data.name

The deparsed name of the x argument.

has.na

Logical, for compatibility (always FALSE).

Author(s)

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

References

Alonso-Pena, M., Gijbels, I. and Crujeiras, R.M. (2022). Flexible joint modeling of mean and dispersion for the directional tuning of neuronal spike counts. Under review.

Examples


data(spikes)
direction<-circular(spikes$direction,units="degrees")
counts<-spikes$counts
output<-dpreg.circ(direction, counts,  k = 5, ktilde = 3)



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