lad(X, y, numdir = NULL, nslices = NULL, numdir.test = FALSE, ...)
n
rows of observations and p
columns of predictors. The predictors are assumed to have a continuous distribution.n
observations, possibly categorical or continuous. It is assumed categorical if nslices=NULL
.y
is continuous, and must be less than $n$. It is used to discretize the continuous response.FALSE
, core
computes the reduction for the specific number of directions numdir
. If TRUE
, it does the computation of the reduction for the numdir
directions, from 0 to numd
GrassmannOptim
.ldr
. The output depends on the argument numdir.test
. If numdir.test=TRUE
, a list of matrices is provided corresponding to the numdir
values (1 through numdir
) for each of the parameters $\Gamma$, $\Delta$, and $\Delta_y$; otherwise, a single list of matrices for a single value of numdir
.
The output of loglik
, aic
, bic
, numpar
are vectors of numdir
elements if numdir.test=TRUE
, and scalars otherwise. Following are the components returned:core, pfc
data(flea)
fit <- lad(X=flea[,-1], y=flea[,1], numdir=2, numdir.test=TRUE)
summary(fit)
plot(fit)
Run the code above in your browser using DataLab