Repository navigation
A troubleshooting help page, and a README bullet that PR #59 left behind (issue #3) - #61
Merged
Merged
Conversation
…o date Issue #3 asks for a troubleshooting section for the optimizer and boundary states. The README has had one since an earlier pass, but it is the landing page rather than the help system, and its first bullet still gave only half of the wrong-skew story -- PR #59 split a collapsed sigma_u into two opposite readings and sfm.Rd and NEWS were updated while the README was not. A reader following it would have taken a suspect fit for the Waldman case. man/sfa-troubleshooting.Rd is the help-system version, built as a sibling of sfa-wrongskew.Rd and in the same shape: symptom first, remedy after. It covers what the README does not -- the two readings of a boundary sigma_u, NTN's sigma_v collapse and why every standard error is NA there, tHN's own boundary and its multistart diagnostic, convergence codes 99, 51 and 52 and what sfa_diagnostics() will and will not call benign, vcov(type = "bhhh") where the Hessian is singular, why sandwich and clustered need keep_objective, simulation noise in the simulated-ML models, the psfm estimators that maximise no likelihood, the factor of two between sfm's and psfm's variance-determinant links, and the reparameterised row names. Every claim was read off the code rather than the docs: the 99 path and its message in opts.R, the 51/52 labels and the benign/unverified verdict in diagnostics.R, the bhhh hint in sfareg_methods.R, SSFE carrying no $opt in psfm.R, and NU reporting theta rather than sigu in starting.values.R. Docs only, so no NEWS entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3, which asks for a troubleshooting section for the common optimizer and boundary issues.
The thing worth fixing first
The README has had a Troubleshooting section since an earlier pass, but its first bullet still said:
PR #59 split that state into two opposite readings — with the skew the wrong way the boundary is the MLE, with the skew the right way the data say inefficiency is present and the fit is suspect — and updated
man/sfm.RdandNEWS.mdwhile the README was left as it was. A reader following the README would have taken a suspect fit for the Waldman case, which is exactly the misreading #59 existed to prevent. That bullet now gives both readings and names the field that decides which applies.The new page
man/sfa-troubleshooting.Rd, a sibling of the existingsfa-wrongskew.Rdand in the same shape — symptom first, remedy after, documentation only. It covers what the README does not have room for:sigma_u, andskewness_test()as the thing to run before concluding either;NTN'ssigma_vcollapse, why the boundary is the estimate there, and why every standard error isNArather than merely missing;tHN's own boundary flag, and$thn_starts$n_distinct > 1as evidence of multimodality rather than of a bad fit;99(this package's own: the last minimizer stage returned nothing usable, so the estimates come from the stage before and the SEs areNA), and51/52, wheresfa_diagnostics()calls a non-zero line-search code benign only with a small relative gradient and a positive definite Hessian to show for it, and unverified when the fit carries no objective to check with;vcov(type = "bhhh")where the Hessian is singular, and why"sandwich"/"clustered"needkeep_objective = TRUE;simulation_se()as the way to quantify it;psfm()estimators that maximise no likelihood, sologLik()/AIC()returnNAby construction;sfm's SD link andpsfm's variance link, andz_link = "var"to align them;fit$out[, "par"].How the claims were checked
Off the code, not off the docs — the docs are what sent me here:
99, its message, and the "tryoptHessian = FALSE,bhhh, other starts" adviceR/opts.R:195-23151= L-BFGS-B warning,52= ERROR, and the benign/unverified verdictR/diagnostics.R:83-131bhhhhint and thekeep_objectiverequirementR/sfareg_methods.R:110-140SSFEcarries no$optR/psfm.R:2735NUreportstheta, notsiguR/starting.values.R:348maxit.bobyqa/maxit.nlminb/maxit.psoptim/maxit.optimR/sfm.R:7-10tools::checkRd()is clean and every\linktarget is an existing topic (sfa-wrongskew,sfa_diagnostics,skewness_test,efficiency_ci,simulation_se,sfareg-methods,sfm,psfm, andvcov.sfaregvia its alias insfareg-methods.Rd).Docs only — no code paths touched, so no NEWS entry.
🤖 Generated with Claude Code