createResidualMaker: Create a residual maker matrix from coefficient names.

Description Usage Arguments Details Value Examples

Description

Create a residual maker matrix from coefficient names.

Usage

1
2
createResidualMaker(coefNames, shouldReturnBigMatrix = FALSE,
  showLMTest = FALSE)

Arguments

coefNames

coefficient names a e.g. c("C|d", "V|a",... "C_d:V_a: ...., C|b:V|a:y")

shouldReturnBigMatrix

default FALSE. If true, RM_bigMat component returned

showLMTest

default FALSE. f True an example test is run for random coefficients.

Details

Given an character vector of coefficient names for a HMNL, this function creates familyNames would include "C", "V", C:V", "C:V:y" result$RM_list a list of residual maker matrices for anihilating all marginal sums of factorial coefficients. and result$RM_bigMat a large (ncoef x ncoef) matrix with non-zero blocks constisting of

Value

result: a list with components familyNames, RM_list and optionally RM_bigMat

Examples

1
2
3
4
5
6
7
coefNames=getTestCoefNames()
result=createResidualMaker(coefNames, shouldReturnBigMatrix=TRUE, showLMTest=TRUE)
if (requireNamespace("nutils", quietly=TRUE)) {
   nutils::showvars(result)
 }else{
   print(str(result))
 }

tnearey/bhmnl documentation built on Nov. 5, 2019, 10:55 a.m.