core(X, y, Sigmas = NULL, ns = NULL, numdir = 2,
numdir.test = FALSE, ...)
n
rows of observations and p
columns of predictors. The predictors are assumed to have a continuous distribution.p
. It is the number of directions to estimate for the reduction.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$, $\Sigma$, and $\Sigma_g$. Otherwise, a single list of matrices for a single value of numdir
. A likelihood ratio test and information criteria are provided to estimate the dimension of the sufficient reduction when numdir.test=TRUE
. The output of loglik
, aic
, bic
, numpar
are vectors with numdir
elements if numdir.test=TRUE
,
and scalars otherwise. Following are the components returned:lad, pfc
data(flea)
fit1 <- core(X=flea[,-1], y=flea[,1], numdir.test=TRUE)
summary(fit1)
data(snakes)
fit2 <- ldr(Sigmas=snakes[-3], ns=snakes[[3]], numdir = 4,
model = "core", numdir.test = TRUE, verbose=TRUE,
sim_anneal = TRUE, max_iter = 200, max_iter_sa=200)
summary(fit2)
Run the code above in your browser using DataLab