This is the repository for the PcAux package which was formerly called "quark."
PcAux assists in automatically extracting auxiliary features for simple, principled missing data imputation.
PcAux is beta software. Please report any issues that you encounter. You may also suggest new features.
Thank you for your interest in PcAux! We hope you find our software useful!
The PcAux
package can be installed from GitHub using one of the following
methods:
pak::pkg_install("Statscamp/PcAux")
devtools::install_github("Statscamp/PcAux")
remotes::install_github("Statscamp/PcAux")
You can find detailed documentation here. We are working diligently to move the documentation directly into the package.
A basic missing data treatment using PcAux
might look like the following:
PcAux
Librarylibrary(PcAux)
data(sample1)
# Examine the sample data
head(sample1)
summary(sample1)
# Create variables to pass as function parameters
# List of nominal variables included in imputation
myNoms <- c("male","incident")
# List of ordinal variables included in imputation
myOrds <- c("grade")
# Exclude row id variables from the imputation
myIds <- c("ID")
# List of other variables to exclude from imputation
myDrops <- c("Qual")
# List of moderators you plan on using in your analysis model
myMods <- c("grade","incident")
prepData
pcaux_obj1 <-
prepData(
rawData = sample1,
moderators = myMods,
nomVars = myNoms,
ordVars = myOrds,
idVars = myIds,
dropVars = myDrops
)
pcaux_obj2 <- createPcAux(
pcAuxData = pcaux_obj1,
nComps = c(Inf, Inf),
interactType = 2,
maxPolyPow = 1,
control = list(minItemPredCor = .3)
)
pcaux_obj3 <-
miWithPcAux(
rawData = sample1,
pcAuxData = pcaux_obj2,
nComps = c(.6, .5),
nImps = 10
)
You can work directly with the principal component auxiliaries by merging them directly back into the raw data:
outData <- mergePcAux(pcAuxData = pcaux_obj3, rawData = sample1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.