Minor bugs/errata fix and refactored using Claude Code.
Default k value is adjusted to be more conservative.
A bug in ExpandDH is fixed.
logk in nlr adjusted
g2inv utility function bug with p=0 fixed.
g2inv utility function is revised to handle non-square matrix.
Default k value in nlr() is adjusted.
If hessian matrix is singular, g2inv() is used instead of solve().
If k option in nlr() is missing, recommended k for conf.level is used.
pProf() improved and exposed
EnvObj() introduced
pProf() bug fixed for NaNs
hSkew() function added
nlr function returns 1/8 likelihood interval which is similar to 95 percent CI.
pProf() internal function plots likelihood profile and interval for the last nlr() run.
Minor beutification of the script - more spaces
dx() further check default graphic parameter
dx() made compatible for rmarkdown
pComp option Col for compartment color added.
pComp option asp=1 should be provided if you need.
pComp for plotting compartment model diagram is added.
qr.solve is used instead of solve.
Documents enhanced.
nlr function gained Error="S" (scale) option. This enables GLS.
DAT table changed.
Analytical solutions of compartmental models added.
Combined error with fixed additive variance model added.
Errata in manual corrected.
dx for simplest diagnostic plot is added.
nlr and wnl5 returns more.
nlr checks arguments more.
Better p-value from cmpChi.
nlr returns more information.
cmpChi is newly introduced.
Method argument added.
Secondary argument added.
wnl5 added.
Changed interface.
First version