When the trend design matrix is identically zero, qr(Ftilde,0) may return a nonzero orthonormal vector Q with R=0. This is a valid QR factorization, but using Q to project Ytilde removes a component of Ytilde even though the column space of Ftilde is {0}. Therefore the QR-based ML variance estimate is not equivalent to the intended zero-mean likelihood in this degenerate trend case.
Could you provide a bit more context about where you encountered this issue?
In particular:
- Which module or function are you referring to?
- Do you have a minimal example that reproduces this behavior, or is this a theoretical concern based on your inspection of the implementation?
Best regards,
Styfen
The concern is plausible: for an m-by-1 all-zero regressor, economy QR can return an arbitrary unit Q and zero R, so Q’Ytilde need not be zero. Unless the implementation checks for zero columns or rank before projecting, the ML variance will differ from the zero-mean likelihood. A minimal guard is any(Ftilde(:)) or a rank check; if false, skip the projection. Whether this is a real bug still depends on the function’s contract and whether zero-column trends are allowed.