View source: R/test_conditional_independence.R
Generate a sample from a locally Gaussian conditional density estimate using
the accept-reject algorithm. If the transform_to_marginal_normality-
component of the lg_object is TRUE, the replicates will be on the
standard normal scale.
1 2 3 4 5 6 7 8 9 10 11 12  | accept_reject(
  lg_object,
  condition,
  n_new,
  nodes,
  M = NULL,
  M_sim = 1500,
  M_corr = 1.5,
  n_corr = 1.2,
  return_just_M = FALSE,
  extend = 0.3
)
 | 
lg_object | 
 An object of type   | 
condition | 
 The value of the conditioning variables  | 
n_new | 
 The number of observations to generate  | 
nodes | 
 Either the number of equidistant nodes to generate, or a vector of nodes supplied by the user  | 
M | 
 The value for M in the accept-reject algorithm if already known  | 
M_sim | 
 The number of replicates to simulate in order to find a value for M  | 
M_corr | 
 Correction factor for M, to be on the safe side  | 
n_corr | 
 Correction factor for n_new, so that we mostly will generate enough observations in the first go  | 
return_just_M | 
 
  | 
extend | 
 How far to extend the grid beyond the extreme data points when interpolating, in share of the range  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.