Interval of Confidence

A discussion forum for RETC users. RETC is a program which can be used to analyze the soil water retention and hydraulic conductivity functions of unsaturated soils.
Post Reply
Dani
Posts: 14
Joined: Mon Jan 13, 2020 12:43 pm
Location: Germany

Interval of Confidence

Post by Dani » Wed Mar 30, 2022 12:13 pm

Dear All,

I was wondering if somebody could explain me or point me out to the literature in order to know How the 95% interval of confidence in RETC is calculated.

In "1.7 Parameter Optimization and Nonlinear Fitting" Simunek and Hopmans, equation [1.7-24] states that

betamin = beta - tdistribution*standard_deviation
betamax = beta + tdistribution*standard_deviation

where beta would be the fitted value, standard deviation has been estimated from doing the square root of the diagonal term of the covariance matrix (namely the variance), and the tdistribution will depend on the number of freedom and the desired value of confidence level.
For instance, in a two-tailed t distribution (https://www.sjsu.edu/faculty/gerstman/S ... -table.pdf) with a 95% of confidence an 5 degrees of freedom I will have a value of 2.571. If we have infinite number of degrees of freedom we will have the classic number of 1.96.

I am not well versed in Fortran therefore I do not get it from the RETC manual how it is calculated. I have seen something like:

Z=1./FLOAT(NOB-NP)
TVAR=1.96+Z*(2.3779+2*(2.7135+2*(3.187936+2.466666*Z**2)))
SECOEF-E(I)*SDEV
TVALUE-TH(I)/SECOEF
TVALUE=DMINl(TVALUE,999999.D0)
TSEC=TVAR*SECOEF
TMCOE=TH(I)-TSEC
TPCOE-TH(I)+TSEC

What is TVAR? where does it come the formula? What is Z? NOB is the total number of observations and NP the total number of parameters, what does it happens if they are equal?

Thanks


Best regards
Dani

Jirka
Posts: 6195
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: Interval of Confidence

Post by Jirka » Wed Mar 30, 2022 6:22 pm

I believe (and I may be wrong) that when Rien was developing RETC (and CFIT) in 70ies, he took the Marquard-Levenberg algorithm (and associated calculations, such as confidence intervals) from some general-purpose library (on the mainframe at Princeton), so it may be difficult to track the origins of it.

In the current version of the code (with the Windows-based GUI), we do the calculations that you showed in your message only if(NOB-NP.gt.0).

References:
Bard, Y. 1974. Nonlinear Parameter Estimation, Academic Press, New York, N.Y., 341pp.

Šimůnek, J., and J. W. Hopmans, Parameter Optimization and Nonlinear Fitting, In: Methods of Soil Analysis, Part 4, Physical Methods, Chapter 1.7, Eds. J. H. Dane and G. C. Topp, Third edition, SSSA, Madison, WI, 139-157, 2002.

Dani
Posts: 14
Joined: Mon Jan 13, 2020 12:43 pm
Location: Germany

Re: Interval of Confidence

Post by Dani » Thu Mar 31, 2022 10:26 am

Thanks for your explanation Jirka,

but it is somehow still unclear to me sorry. So, only if the number of observations minus the number of parameters is bigger than 0, RETC does:

Z=1./FLOAT(NOB-NP)
TVAR=1.96+Z*(2.3779+2*(2.7135+2*(3.187936+2.466666*Z**2)))
SECOEF-E(I)*SDEV
TVALUE-TH(I)/SECOEF
TVALUE=DMINl(TVALUE,999999.D0)
TSEC=TVAR*SECOEF
TMCOE=TH(I)-TSEC
TPCOE-TH(I)+TSEC

Is that right? Otherwise the equation is like 1.7-24 in [1]?

Thanks again


References:

[1] Šimůnek, J., and J. W. Hopmans, Parameter Optimization and Nonlinear Fitting, In: Methods of Soil Analysis, Part 4, Physical Methods, Chapter 1.7, Eds. J. H. Dane and G. C. Topp, Third edition, SSSA, Madison, WI, 139-157, 2002

Jirka
Posts: 6195
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: Interval of Confidence

Post by Jirka » Thu Mar 31, 2022 3:38 pm

The current version of RETC will not evaluate and print confidence intervals. The code you showed, as well as the printing is skipped. J.
* ----- Calculate 95% confidence interval -----
if(NOB-NP.gt.0) then
Z=1./float(NOB-NP)
SDev=dsqrt(Z*SumB)
write(7,1058)
TVAR=1.96+Z*(2.3779+Z*(2.7135+Z*(3.187936+2.466666*Z**2)))
do 82 i=1,NP
SeCoef=E(i)*SDev
TValue=TH(i)/SeCoef
TValue=dmin1(TValue,999999.d0)
TSec=TVar*SeCoef
TMCoe=TH(i)-TSec
TPCoe=TH(i)+TSec
if(NP.eq.1)write(7,1060) AB(i),TH(i),SeCoef,TMCoe,TPCoe
if(NP.gt.1)write(7,1062) AB(i),TH(i),SeCoef,TValue,TMCoe,TPCoe
82 continue
end if

Post Reply