pldam | R Documentation |
More about it
pldam(
mat = mat,
group = group,
mattoid = mattoid,
codetoid = codetoid,
ncpts = 20,
limproba = 0,
limCVP = FALSE,
nrep = 100,
return.matrix = TRUE,
minInd = NULL
)
mat |
matrix with the 'known' data (usually PC scores, but works also with univariate data) |
group |
grouping factor of the 'known' data |
mattoid |
matrix with the data to be predicted |
codetoid |
label of the specimens to predict |
ncpts |
number of PCs to retain |
limproba |
a limit for the posterior probability to be concidered |
limCVP |
a limit for the cross validation percent of the discriminate analysis to be concidered |
nrep |
number of replicates |
return.matrix |
|
minInd |
the number of specimens to include for the balanced design if smaller than the smallest of the "known" groups |
a list
# Some examples
# Grab some data from pig
mat <- pig$mat
gp <- pig$gp
# For the sake of reproducibility
set.seed(123)
train_ids <- sample(nrow(mat), 150, replace=FALSE)
pldam(# train data
mat=mat[train_ids, ], group=gp[train_ids],
# test data
mattoid=mat[-train_ids, ], codetoid=paste0("id_", 1:nrow(mat[-train_ids, ])),
nrep=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.