hatize_byname function

Creates a diagonal "hat" matrix from a vector