Learn R Programming

PhaseGMM (version 0.1.0)

PhaseGradient: Gradient of the phase-function estimating equations

Description

Computes the gradient of the phase-function estimating equations with respect to the regression coefficients.

Usage

PhaseGradient(beta, S_y, C_y, WZ, t, estWeight)

Value

Numeric vector of length p + q containing the phase-function gradient evaluated at beta.

Arguments

beta

Numeric vector of length p + q containing the regression coefficients.

S_y

Numeric vector containing sum_j sin(t * Y_j) evaluated on the grid t.

C_y

Numeric vector containing sum_j cos(t * Y_j) evaluated on the grid t.

WZ

Numeric matrix of dimension n x (p + q) containing all covariates.

t

Numeric vector giving the grid of frequency values.

estWeight

Numeric vector of length n giving observation weights.