sprmda(formula, data, a, eta, fun = "Hampel", probp1 = 0.95, hampelp2 = 0.975,
hampelp3 = 0.999, probp4=0.01, yweights = TRUE,
class = c("regfit", "lda"), prior = c(0.5, 0.5), center = "median", scale = "qn",
print = FALSE, numit = 100, prec = 0.01)"Hampel" (preferred), "Huber" or "Fair".fun="Hampel".fun="Hampel".yweights=FALSE.FALSE. If TRUE the variables included in each component are reported.Functions summary, predict and biplot are available. Also the generic functions coefficients, fitted.values and residuals can be used to extract the corresponding elements from the sprmda object.
scores=Xs%*%R.w=sqrt(wy*wt).class="lda" a robust LDA model is estimated in the SPRM score space for class="regfit" the model ist a robust sparse PLS regression model on the binary response.sprmdaCVdata(iris)
data <- droplevels(subset(iris,iris$Species!="setosa"))
smod <- sprmda(Species~.,data, a=2, eta=0.7, class="lda")Run the code above in your browser using DataLab