sanssouci.hmm: Title

View source: R/sanssouci.hmm.R

sanssouci.hmmR Documentation

Title

Description

Title

Usage

sanssouci.hmm(
  x,
  al,
  sel_function = Selection_delta,
  delta = 0.1,
  h = 0.3,
  f0_known = TRUE,
  norm_init = TRUE,
  n_boot = 20,
  seuil = 0.05,
  m0_init = 0,
  sd0_init = 1,
  df_init = NULL,
  max_pi0 = 0.99999,
  approx = TRUE,
  min_size = 5,
  min_jump = 3,
  type_init = "given",
  drop_sel = TRUE
)

Arguments

x

numeric vector, of statistics (order using a given order)

al

numeric, the risk

sel_function

a function that return a tibble with selected set (see details)

delta

anumeric, risk delta to share the risk alpha between the bootstrap part and the estimated part

h

numeric, the window size for the kde

f0_known

logical, wether f0 is known (if f0_known =TRUE the initialisation will be the true law under H0)

norm_init

logical, wether the initialisation is normal or not (consider student)

n_boot

numeric, number of bootstrap sample

seuil

numeric, threshold for selected pvalues

m0_init

numeric, expectency under H0 (if norm_init = TRUE)

sd0_init

numeric, expectency under H0

df_init

numeric, if norm_init = FALSE, student degree of freedom

max_pi0

the maximum value for the first estimation of pi0

approx

wheter the kde is approximated using linear interpolation with a large range of values or calculate for every point.

Examples

m <- 2000
theta <- sim_markov(m, Pi = c(0.8,0.2), A = matrix(c(0.95, 0.05, 0.2, 0.80), 2, 2, byrow = T))
x <- rep(0, m)
 x[theta == 0] <- rnorm(sum(theta ==0))
 x[theta == 1] <- rnorm(sum(theta ==1), 2, 1)
 sanssouci.hmm(x, al= 0.1, sel_function = Selection_delta) 

Marie-PerrotDockes/sanssouci.hmm documentation built on Oct. 26, 2023, 10:36 a.m.