Description Usage Arguments Details Value Author(s) Examples
View source: R/find_MixtureThreshold_Simulation.r
Function used to apply a single bootstrap sample of two component univariate mixture models on feature of interest and find real intersection (valley between the two mixture model means). This function is intended for simulation studies, where the underlying classification of each feature is known; to be called from inside a for-loop for no.bootstrap iterations.
1 2 | find_MixtureThreshold(dat, gRoup, boot.size, method=c('diff', 'intersect'),
apply.all.dat = FALSE)
|
dat |
vector of selected features. |
gRoup |
Known classification of features (groups A or B). |
method |
Either 'diff' or 'intersection'. Former argument estimates the difference in the posterior probability. Later argument calls on function findInt() to find the real value intersection between two Guassian mixture means. |
apply.all.dat |
boolean: FALSE implies take sample with replacement on dat and is the default for bootstrapping; TRUE denotes otherwise and no sampling of dat is performed |
Default arguments are method = 'intersection', apply.all.dat = FALSE in order to implement FSPmix algorithm.
mix.threshold |
Real value of mixture intersection |
boot.samp |
Bootstrap sample of data set/ vector |
mix.mean |
Vector of mixture model means |
sw |
boolean: Indicator variable denoting if mix.threshold was found (sw == 1); if threhsold was not found sw == 0 |
Marcela Cespedes and Amy Chan
1 2 3 4 5 6 7 8 9 10 11 12 | library(mixtools)
library(reshape2)
source("SimulationStudy2.r")
# Simulation study for 20 Genes
dat<- SimulationStudy1()
head(dat)
op<- find_MixtureThreshold_Simulation(dat = dat[,1], gRoup =as.character(dat$group),
boot.size = 800, method='intersection')
str(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.