Learn R Programming

SCGLR (version 1.1)

kComponents: Estimation algorithm for K components

Description

calculates the K components by iteratively calling function oneComponent

Usage

kComponents(X, Y, AX, K, family, size = NULL,
    offset = NULL, crit = list())

Arguments

X
matrix (n*p) containing the standardized covariates
Y
matrix (n*q) containing dependent variables
AX
matrix of additional covariates used in the generalized regression but not entering the linear combinations giving components
K
integer specifying the number of components
family
a vector of the same length as the number of responses containing characters identifying the distribution families of the dependent variables. "bernoulli", "binomial", "poisson" or "gaussian" are allowed.
size
matrix of size statistical units * number of binomial responses, giving the number of trials for binomial dependent variables.
offset
used for the poisson dependent variables. A vector or a matrix of size: number of observations * number of Poisson dependent variables is expected
crit
a list of maxit and tol, default is 50 and 10e-6. If responses are bernoulli variables only, tol should generally be increased

Value

  • a list
  • umatrix of size (number of regressors * number of components), contains the component-loadings, i.e. the coefficients of the regressors in the linear combination giving each component
  • compmatrix of size (number of statistical units * number of components) having the components as column vectors
  • comprmatrix of size (number of statistical units * number of components) having the standardized components as column vectors
  • dsthe final value of the regularization degree