Description Usage Arguments Value Examples
View source: R/prepareDataforGlm.R
Given a data frame holding feature data and a binary response column, find a hyperplane separating the two groups of data points. The core code solving the linear program is taken from the package safeBinaryRegression.
1 2 | analyzeSeparation(data, max.dim = 2, all.dim = TRUE, tol1 = 0.001,
tol2 = 1e-09)
|
data |
A data.frame containing a column called Response, holding a binary vector. |
max.dim |
The maximum number of features to simultaneously be considered for allowing data to be separated. Hence, if max.dim == 2, all pairs of features are screened. |
all.dim |
Analyze all features simulatneously. |
tol1 |
The tolerance for considering the points separated: the sum of all betas has to be larger than tol1. |
tol2 |
The tolerance for considering an individual feature to be involved. |
A list with two slots: a logical value saying if the data points are separated and a vector of distances to the separating hyperplane.
1 2 3 4 5 6 7 8 | # get gene locations
wells <- findWells(plates="J101-2C", well.names=c("H2", "H6"))
data <- unlist(getSingleCellData(wells), recursive=FALSE)
cleaned <- lapply(data, cleanData, "lower")
melted <- lapply(cleaned, meltData)
prepared <- prepareDataforGlm(melted[[2]]$mat$Cells,
melted[[1]]$mat$Cells, test=NULL)
sep1 <- analyzeSeparation(dat1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.