correctXMissingness: Replace missing entries in X by their expectation to set...

View source: R/F_correctXMissingness.R

correctXMissingnessR Documentation

Replace missing entries in X by their expectation to set their contribution to the estimating equations to zero

Description

Replace missing entries in X by their expectation to set their contribution to the estimating equations to zero

Usage

correctXMissingness(X, mu, allowMissingness, naId)

Arguments

X

the matrix of counts

mu

the matrix of expectations

allowMissingness

A boolean, are missing values present

naId

The numeric index of the missing values in X

Value

The matrix X with the NA entries replaced by the corresponding entries in mu

Note

This may seem like a hacky approach, but it avoids having to deal with NAs in functions like crossprod().


CenterForStatistics-UGent/RCM documentation built on April 24, 2023, 8:26 p.m.