emProbLL: Calculate the probability of LL classification from an EM...

Description Usage Arguments Value Author(s) Examples

View source: R/bootstrapLatencyClustering.R

Description

Classifies new data using a pre-existing Gaussian mixture from an object of type Mclust.

Usage

1
emProbLL(clusters, latency)

Arguments

clusters

An object of class Mclust, which should contain a two-class Gaussian mixture model fit to average latency data.

latency

A vector of average latencies. The probability of LL classification is computed for each entry.

Value

A vector containing LL probabilities for each input latency.

Author(s)

Philip A Cook <cookpa@pennmedicine.upenn.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
set.seed(20140123)

sl <- rnorm(60, 200, 100)
sl[which(sl < 0)] <- 0

ll <- rnorm(15, 600, 100)
ll[which(ll > 900)] <- 900

latency = c(sl, ll)

library(mclust)

clusters = Mclust(latency, G=2)

emProbLL(clusters, c(300, 400, 500))

cookpa/socialdefeat documentation built on May 17, 2019, 10:12 p.m.