Usage
yai(x=NULL,y=NULL,data=NULL,k=1,noTrgs=FALSE,noRefs=FALSE,
nVec=NULL,pVal=.05,method="msn",ann=TRUE,mtry=NULL,ntree=500,
rfMode="buildClasses")
Arguments
x
1) a matrix or data frame containing the X-variables for all
observations. Row names are the identification for the observation, or 2) a
one-sided formula defining the X-variables as a linear formula. If
a formula is coded for x
,
y
1) a matrix or data frame containing the Y-variables for the
reference observations, or 2) a one-sided formula defining the
Y-variables as a linear formula.
data
when x
and y
are formulas, then data is a data frame or
matrix that contains all the variables. The observations are split by yai
into two sets.
k
the number of nearest neighbors; default is 1.
noTrgs
when TRUE, skip finding neighbors for target observations.
noRefs
when TRUE, skip finding neighbors for reference observations.
nVec
number of canonical vectors to use (methods msn
and msn2
),
or number of independent of X-variables reference data when method
mahalanobis
. When NULL, the number is set by the function.
pVal
significant level for canonical vectors, used when method
is
msn
or msn2
.
method
is the strategy finding neighbors; the
options are the quoted key words (see details):
[object Object]
- ann
{TRUE if ann
is used to find neighbors, FALSE if a slow search is used.}