sfareg-methods.Rd: a method table up front, and correct what vcov and nobs do (issue #3) - #49
Merged
Merged
Conversation
… nobs do (issue #3) The page said vcov() returns solve(opt$hessian); it inverts an equilibrated Hessian and maps the result to the reported scale. It said nobs() reads object$data or re-evaluates the call; it reads the stored count first, then the data, then a per-observation vector, and validates any re-evaluated data. It listed four of the nine entry points that return "sfareg". The long discussion now sits under titled subsections. \usage is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014oJL17ewiahA8pWbemnqNp
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.
This continues the issue #3 readability pass with
sfareg-methods.Rd(coef,vcov,logLik,nobs,estfun,bread). Three statements on the page were stale; each was checked againstR/sfareg_methods.RandR/sandwich_methods.R.Corrected facts
vcov()"issolve(object$opt$hessian)".sfa_solve_equilibrated()scales the Hessian to unit diagonal (when that diagonal is positive) before inverting..sfa_map_vcov()then maps the inverse onto the reported scale. The diagonal fallback warns only when inversion or mapping fails. A fit with no Hessian falls back to the diagonal silently, or, with no SEs either, returnsNAwith a warning (checked on anoptHessian = FALSEfit).nobs()readsobject$data, or else re-evaluates the call'sdataobject$nobs) first, thenobject$data, then a per-observation vector, and only then re-evaluatesdata. Re-evaluated data must pass the A47 data check. Checked: ansfmfit with oneNArow reports 299 of 300."sfareg"is returned bypsfm,sfm,zsfm,ttsfmlcsfm,copsfm,ivsfm,selsfmandesfm(classc("esfm", "sfareg")).npsfmreturns"npsfareg", so it is not listed.Layout
No technical content was removed.
\usageis byte-identical,tools::checkRd()is clean, and the rendered text was checked withRdconv -t txt.🤖 Generated with Claude Code
https://claude.ai/code/session_014oJL17ewiahA8pWbemnqNp
Generated by Claude Code