call_cpp {BeviMed} | R Documentation |

Allows other functions in the package to call the c++ function passing arguments more succinctly and by name.

```
call_cpp(
samples_per_chain,
y,
block_starts,
block_ends,
cases,
counts,
min_ac,
tau_shape,
pi_shape,
omega_shape,
temperatures,
z0_matrix,
estimate_omega,
logit_omegas,
logit_omega_proposal_sds,
variant_weights,
estimate_phi,
log_phis,
log_phi_mean,
log_phi_sd,
log_phi_proposal_sds,
chain_swaps_per_cycle,
annealing,
tandem_variant_updates,
comphet_variant_block_starts,
comphet_variant_block_ends,
comphet_variants,
return_z_trace,
return_x_trace,
burn = 0,
check = TRUE
)
```

`samples_per_chain` |
Number of samples to draw from each chain. |

`y` |
Logical vector of subject affectedness status. |

`block_starts` |
Integer vector of k 0-indexed start positions (with respect to |

`block_ends` |
Integer vector of (exclusive) k 0-indexed end positions. |

`cases` |
0 based vector of case indices with respect to y. |

`counts` |
Vector of variant counts. |

`min_ac` |
Integer vector with a length equalling the number of individuals or length |

`tau_shape` |
Beta distribution parameterisation of benign variant configuration rate of affection, q. |

`pi_shape` |
Beta distribution parameterisation of pathogenic variant configuration rate of affection, p. |

`omega_shape` |
Beta distribution of global rate of pathogenicty of variants in gene given pathogenicity of gene, omega. |

`temperatures` |
Numeric vector of temperatures of power posteriors. One chain will be created for each element of the vector at the corresponding temperature. |

`z0_matrix` |
Matrix of logicals, where the rows are used as an initial zs for the chains. |

`estimate_omega` |
Logical value determining whether to estimate the parameter omega. |

`logit_omegas` |
Numeric vector of logit omega values, one value per chain. |

`logit_omega_proposal_sds` |
Numeric vector of proposal standard deviations for Metropolis-Hastings sampling of logit omega parameter, one value per chain. |

`variant_weights` |
Vector of log-odds off-sets for rates of pathogenicity of individual variants relative to the global rate, omega. |

`estimate_phi` |
Logical value determining whether to estimate a scaling factor of |

`log_phis` |
Numeric vector of log phi values, one value per chain. |

`log_phi_mean` |
Mean for normal prior on scaling factor phi. |

`log_phi_sd` |
SD for normal prior on scaling factor phi. |

`log_phi_proposal_sds` |
Numeric vector of proposal standard deviations for Metropolis-Hastings sampling of log phi parameter, one value per chain. |

`chain_swaps_per_cycle` |
Number of chain swaps to propose per update cycle. |

`annealing` |
Logical value determining whether to anneal the chains, e.g. for optimisation. |

`tandem_variant_updates` |
Number of tandem variant updates to make per update cycle. |

`comphet_variant_block_starts` |
0-indexed start positions for contiguous blocks of variants in |

`comphet_variant_block_ends` |
As |

`comphet_variants` |
Integer vector giving variant numbers (0-based, i.e. between 0 and k-1). Used to pick pairs of variants for tandem updates from. |

`return_z_trace` |
Logical value determining whether to store the z-vectors for each chain, which uses alot of memory, particularly if |

`return_x_trace` |
Logical value determining whether to store the x variable determined by success samples of z. Potentially uses alot of memory, particularly if |

`burn` |
Number of samples to drop from the start of the chain. |

`check` |
Logical value indicating whether to perform validation on the arguments before calling the c++ function. |

Object of class `BeviMed_raw`

, containing the output of the MCMC sampling.

[Package *BeviMed* version 5.8 Index]