Fits a groc model with the grid algorithm.
grocfit(X, Y, ncomp = min(nrow(X) - 1, ncol(X)), D = NULL, gamma =
0.75, method = NULL, plsrob = FALSE, Nc = 10, Ng = 20,
scale = FALSE, Cpp = TRUE, stripped = FALSE, maxiter =
100, sp = NULL, ...)
data used as response.
an array of fitted values. Its element [i,j,k] is the fitted value for observation i, response j, and when k components are used.
an array of regression residuals. It has the same
dimensions as fitted.values
.
a matrix of orthogonal components (scores). Each column corresponds to a component.
a matrix of directions (loadings). Each column is a direction used to obtain the corresponding component (scores).
contain the objects produced by the fit of the responses on the orthogonal components.
contain the objects produced by the "lts" fit of each deflated predictors on the orthogonal components. Hobjects
are produced when plsrob=TRUE
.
matrix of coefficients produced by the "lm" fit of each deflated predictors on the last component. B
is produced when plsrob=FALSE
.
a vector of means of the X variables.
a vector of means of the Y variables.
Dependence measure used.
a matrix whose columns contain the right singular vectors of the data. Computed in the preprocessing to principal component scores when the number of observations is less than the number of predictors.
dimnames of 'fitted.values'
a matrix of predictors. NA
s and Inf
s are not allowed.
a vector or matrix of responses. NA
s and Inf
s are not allowed.
the number of components to be used in the modelling.
Dependence measure.
Used to set the breakdown value when method="lts"
.
the method to be used. Currently only 'lm', 'lo', 's', and 'lts'.
Logical. If TRUE
, the function sets D=covrov
and method="lts"
for a robust partial least squares fit.
Integer. Number of cycles in the grid algorithm
Integer. Number of points for the grid in the grid algorithm.
Logical. If TRUE
the responses are scaled.
Logical. If TRUE
, compuations are performed in a faster way using
a C code.
logical. If TRUE
the calculations are stripped
as much as possible for speed; this is meant for use with
cross-validation or simulations when only the coefficients are
needed. Defaults to FALSE
.
Integer. Maximal number of iterations in the grid algorithm. Used only when there are more than one response.
A vector of smoothing parameters can be provided here. Smoothing parameters must be supplied in the order that the smooth terms appear in the model formula. Negative elements indicate that the parameter should be estimated, and hence a mixture of fixed and estimated parameters is possible. 'length(sp)' should be equal to 'ncomp' and corresponds to the number of underlying smoothing parameters.
other arguments. Currently ignored.
Martin Bilodeau (bilodeau@dms.umontreal.ca) and Pierre Lafaye de Micheaux (lafaye@unsw.edu.au)
Martin Bilodeau, Pierre Lafaye de Micheaux, Smail Mahdi (2015), The R
Package groc for Generalized Regression on Orthogonal Components,
Journal of Statistical Software, 65(1), 1-29,
https://www.jstatsoft.org/v65/i01/