Skip to content

Score-equations solution declares a column vector as a row-tuple without transpose #1156

Description

@d-morrison

_subfiles/count-regression/_exr-prac-glm-score.qmd:80 declares a column
vector using a row-tuple and no transpose:

where $\vx_{(j)} = (x_{1j}, \ldots, x_{nj})$ is the column of $j$-th
predictor values

One line earlier the same solution writes

$\tp{\vx_{(j)}}(\vy - \est{\vec{\mu}}) = 0$

which requires $\vx_{(j)}$ to be a column vector for the dimensions to work:
$\tp{\vx_{(j)}}$ is $1 \times n$ and $(\vy - \est{\vec{\mu}})$ is $n \times
1$. As written, the declaration says it is a row.

CLAUDE.md asks for dimension compatibility to be verified for every matrix
expression. The fix is $\vx_{(j)} = \tp{(x_{1j}, \ldots, x_{nj})} \in \reals^n$, matching the form
#1138 used for the identical
problem two files over in _sec_pois-reg_intro.qmd
($\vX = (X_1, \dots, X_n)$ became
$\vX = \tp{(X_1, \dots, X_p)} \in \reals^p$).

Pre-existing on main and adjacent to #1138's changes rather than part of
them, so left out of that PR. Worth a sweep for the same pattern elsewhere
in the chapter while fixing.

Filed by Claude Code (AI agent).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions