This function builds upon the
quark function to provide a
final dataset comprised of the original dataset provided to
quark and enough principal components to be able to account
for a certain level of variance in the data.
Provide a percentage of variance that you would like to have explained. That many components (columns) will be extracted and kept with the output dataset. Enter this variable as a number WITHOUT a percentage sign.
The output of this function is the original dataset used in quark combined with enough principal component scores to be able to account for the amount of variance that was requested.
Steven R. Chesnut (University of Southern Mississippi Steven.Chesnut@usm.edu)
set.seed(123321) dat <- HolzingerSwineford1939[,7:15] misspat <- matrix(runif(nrow(dat) * 9) < 0.3, nrow(dat)) dat[misspat] <- NA dat <- cbind(HolzingerSwineford1939[,1:3], dat) quark.list <- quark(data = dat, id = c(1, 2)) final.data <- combinequark(quark = quark.list, percent = 80)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.