Learn R Programming

ordinalTables (version 1.0.0.3)

log_linear_add_all_diagonals: Adds indicator variables for the diagonal cells in table n.

Description

Adds indicator variables for the diagonal cells in table n.

Usage

log_linear_add_all_diagonals(n, x)

Value

new design matrix with nrow(n) columns added. The columns are all 0 unless the row corresponds to a diagonal cell in n, in which case the entry is 1

Arguments

n

the matrix of observed counts

x

the design matrix to be augmented

Examples

Run this code
x <- log_linear_main_effect_design(vision_data)
x_prime <- log_linear_add_all_diagonals(vision_data, x)

Run the code above in your browser using DataLab