F_doubletree: Calculate the F term; an array

View source: R/RcppExports.R

F_doubletreeR Documentation

Calculate the F term; an array

Description

NB: does this work for the case where missing tree1 label can be in multiple domains, and missing/non-missing can happen at the same time for any domain?

Usage

F_doubletree(
  psi,
  g_psi,
  phi,
  g_phi,
  X,
  ind_obs_i,
  rmat,
  E_beta,
  E_beta_sq,
  E_eta,
  E_eta_sq,
  v1_lookup_NA_replaced,
  v2_lookup
)

Arguments

psi, g_psi, phi, g_phi

local variational parameters

X

transformed data: ⁠2Y-1⁠; with potential missing responses

ind_obs_i

List of length N; each element is a vector of integers; variable lengths.

rmat

matrix (N by K); row sums are one - the class probabilities for each observation.

E_beta, E_beta_sq, E_eta, E_eta_sq

moment updates produced by get_moments_cpp_doubletree

v1_lookup_NA_replaced

pL1+1 for NA in tree1 leaf

v2_lookup

v2_lookup is a vector of length equal to the total number of rows in X; each element is an integer, indicating which leaf does the observation belong to in tree2

Details

This function updates the N by pL1 matrix emat in the package

Value

n by pL1 by K


zhenkewu/doubletree documentation built on Oct. 21, 2023, 7:04 a.m.