View source: R/opcg_wrap_cpp.R
opcg_made | R Documentation |
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() )
x_matrix |
a 'nxp' matrix of predictors; |
y_matrix |
a 'nxm' response; |
bw |
the bandwidth parameter for the kernel; the default kernel is gaussian |
lambda |
an L2 penalty term for the negative log-likelihood |
B_mat |
the fixed coefficient matrix in MADE-step of MADE; not needed for OPCG, i.e. is set to the identity |
ytype |
the response type; continuous, categorical or ordinal |
method |
"newton" or "cg" methods; for carrying out the optimization using the standard newton-raphson (i.e. Fisher Scoring) or using Congugate Gradients |
parallelize |
Default is False; to run in parallel, you will need to have foreach and some parallel backend loaded; parallelization is strongly recommended and encouraged. |
r_mat |
a 'pxd' matrix for refining the weights in rOPCG and rMADE |
control_list |
a list of control parameters for the Newton-Raphson or Conjugate Gradient methods |
ahat - List of estimated local intercepts
Dhat - List of estimated local slopes/gradients
Dhat_ls - List of initial values for local slopes/gradients; for least squares, these are the same as the Dhat
weights - The kernel weights used in the local-linear estimation;
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.