ea_phi_mixG_DL_bounds: Obtain bounds for phi function

View source: R/mixG_fusion.R

ea_phi_mixG_DL_boundsR Documentation

Obtain bounds for phi function

Description

Finds the lower and upper bounds of the phi function between an interval

Usage

ea_phi_mixG_DL_bounds(
  n_comp,
  weights,
  means,
  sds,
  beta,
  precondition,
  PHI,
  lower,
  upper,
  bounds_multiplier,
  seq_length = 1000
)

Arguments

n_comp

integer number of components of mixture Gaussian

weights

vector: weights of mixture Gaussian

means

vector: means of mixture Gaussian

sds

vector: st.devs of mixture Gaussian

beta

real value

precondition

precondition value

PHI

global lower bound of phi

lower

lower end of interval

upper

upper end of interval

bounds_multiplier

scalar value to multiply bounds by (should greater than or equal to 1)

seq_length

desired length of the sequence that we compute phi in the interval [lower, upper]. Default is 1000

Value

vector of lower and upper bound of phi-function between [lower, upper]

Examples

weights <- c(0.4, 0.6)
means <- c(-3, 6)
sds <- c(1, 2)
beta <- 0.5
precondition <- 1.5
lower <- -10
upper <- 4
curve(ea_phi_mixG_DL(x,
                     n_comp = 2,
                     weights = weights,
                     means = means,
                     sds = sds,
                     beta = beta,
                     precondition = precondition),
      from = -20, to = 25, n = 10000,
      ylab = 'phi')
PHI <- ea_phi_mixG_DL_LB(n_comp = 2,
                         weights = weights,
                         means = means,
                         sds = sds,
                         beta = beta,
                         precondition = precondition,
                         bounds_multiplier = 1)
bounds <- ea_phi_mixG_DL_bounds(n_comp = 2,
                                weights = weights,
                                means = means,
                                sds = sds,
                                beta = beta,
                                precondition = precondition,
                                PHI = PHI,
                                lower = lower,
                                upper = upper,
                                bounds_multiplier = 1)
abline(v=c(lower, upper))
abline(h=PHI, col = 'red')
abline(h=c(bounds$UB, bounds$LB), col = 'blue', lty = 2)


rchan26/hierarchicalFusion documentation built on Sept. 11, 2022, 10:30 p.m.