find_MixtureThreshold_Simulation: Single bootstrap sample of mixture model and threshold on...

Description Usage Arguments Details Value Author(s) Examples

View source: R/find_MixtureThreshold_Simulation.r

Description

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.

Usage

1
2
find_MixtureThreshold(dat, gRoup, boot.size, method=c('diff', 'intersect'),
                          apply.all.dat = FALSE)

Arguments

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

Details

Default arguments are method = 'intersection', apply.all.dat = FALSE in order to implement FSPmix algorithm.

Value

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

Author(s)

Marcela Cespedes and Amy Chan

Examples

 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)

MarcelaCespedes/FSPmix documentation built on May 12, 2020, 5:49 p.m.