This is an internal function called by OPCG. MADE also uses this function in its OPCG-step. This estimates the local intercept and slope coefficients.
opcg_made(
x_matrix,
y_matrix,
bw,
lambda,
B_mat = NULL,
ytype = "continuous",
method = "newton",
parallelize = F,
r_mat = NULL,
control_list = list()
)
a 'nxp' matrix of predictors;
a 'nxm' response;
the bandwidth parameter for the kernel; the default kernel is gaussian
an L2 penalty term for the negative log-likelihood
the fixed coefficient matrix in MADE-step of MADE; not needed for OPCG, i.e. is set to the identity
the response type; continuous, categorical or ordinal
"newton" or "cg" methods; for carrying out the optimization using the standard newton-raphson (i.e. Fisher Scoring) or using Congugate Gradients
Default is False; to run in parallel, you will need to have foreach and some parallel backend loaded; parallelization is strongly recommended and encouraged.
a 'pxd' matrix for refining the weights in rOPCG and rMADE
a list of control parameters for the Newton-Raphson or Conjugate Gradient methods