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
def non_linear_parameters_95_percent_confidence_interval(fvec, jac): | |
"""Returns the 95% confidence interval on parameters from | |
non-linear fit results.""" | |
# residual sum of squares | |
rss = np.sum(fvec**2) | |
# number of data points and parameters | |
n, p = jac.shape | |
# the statistical degrees of freedom | |
nmp = n - p | |
# mean residual error |