R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Reorder rows and columns of a square matrix
#'
#' @param Y a square matrix
#' @param o a permutation vector of 0,1,...,(n-1), where n is the number of rows/columns of Y
#' @return the reordered square matrix of same size as Y
#' @export
reorder_once <- function(Y, o) {
    .Call('_mmsbmdag_reorder_once', PACKAGE = 'mmsbmdag', Y, o)
}

#' Run the regular Gibbs sampler of MMSBM
#'
#' @param Y the adjacency matrix representing the graph
#' @param o_init initial value of the ordering vector
#' @param alpha_init initial value of alpha
#' @param s_alpha_init initial value of proposal standard deviation for alpha's Metropolis step
#' @param a,b hyperparameters for alpha's prior
#' @param A,B square matrices of the hyperparameters for group-to-group probabilities' prior
#' @param n_swap number of swaps in order per iteration
#' @param N,thin,burnin,print_freq MCMC quantities
#' @return a list of data frames and matrices representing the MCMC output
#' @export
rgs_mmsbm <- function(Y, o_init, alpha_init, s_alpha_init, a, b, A, B, n_swap = 1L, N = 1000L, thin = 1L, burnin = 100L, print_freq = 100L) {
    .Call('_mmsbmdag_rgs_mmsbm', PACKAGE = 'mmsbmdag', Y, o_init, alpha_init, s_alpha_init, a, b, A, B, n_swap, N, thin, burnin, print_freq)
}
clement-lee/mmsbmdag documentation built on May 31, 2019, 4:59 a.m.