groc.fit: Fitting a groc model

Description Usage Arguments Value Author(s) References

View source: R/groc.R

Description

Fits a groc model with the grid algorithm.

Usage

1
2
3
4
groc.fit(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, ...)

Arguments

X

a matrix of predictors. NAs and Infs are not allowed.

Y

a vector or matrix of responses. NAs and Infs are not allowed.

ncomp

the number of components to be used in the modelling.

D

Dependence measure.

gamma

Used to set the breakdown value when method="lts".

method

the method to be used. Currently only 'lm', 'lo', 's', and 'lts'.

plsrob

Logical. If TRUE, the function sets D=covrov and method="lts" for a robust partial least squares fit.

Nc

Integer. Number of cycles in the grid algorithm

Ng

Integer. Number of points for the grid in the grid algorithm.

scale

Logical. If TRUE the responses are scaled.

Cpp

Logical. If TRUE, compuations are performed in a faster way using a C code.

stripped

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.

maxiter

Integer. Maximal number of iterations in the grid algorithm. Used only when there are more than one response.

sp

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.

Value

Y

data used as response.

fitted.values

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.

residuals

an array of regression residuals. It has the same dimensions as fitted.values.

T

a matrix of orthogonal components (scores). Each column corresponds to a component.

R

a matrix of directions (loadings). Each column is a direction used to obtain the corresponding component (scores).

Gobjects

contain the objects produced by the fit of the responses on the orthogonal components.

Hobjects

contain the objects produced by the "lts" fit of each deflated predictors on the orthogonal components. Hobjects are produced when plsrob=TRUE.

B

matrix of coefficients produced by the "lm" fit of each deflated predictors on the last component. B is produced when plsrob=FALSE.

Xmeans

a vector of means of the X variables.

Ymeans

a vector of means of the Y variables.

D

Dependence measure used.

V

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.

dnnames

dimnames of 'fitted.values'

Author(s)

Martin Bilodeau (bilodeau@dms.umontreal.ca) and Pierre Lafaye de Micheaux (lafaye@unsw.edu.au)

References

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/


groc documentation built on Dec. 18, 2020, 9:07 a.m.

Related to groc.fit in groc...