Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sébastien Villemot
antik
Commits
8644ef5c
Commit
8644ef5c
authored
Jun 19, 2013
by
Liam M. Healy
Browse files
Correct estimated uncertainty in parameters for linear least squares fit
parent
82bea709
Changes
1
Hide whitespace changes
Inline
Side-by-side
optimize/least-squares.lisp
View file @
8644ef5c
;; Least squares estimation
;; Liam Healy 2013-03-29 14:16:21EDT least-squares.lisp
;; Time-stamp: <2013-0
3-2
9 15:
50:57
EDT least-squares.lisp>
;; Time-stamp: <2013-0
6-1
9 15:
09:38
EDT least-squares.lisp>
;; Copyright 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
...
...
@@ -35,8 +35,8 @@
(
metabang-bind:bind
(((
:values
intercept
slope
intercept-variance
covariance
slope-variance
sum-square-of-residuals
)
(
gsl:linear-fit
times
(
grid:make-simple-grid
:grid-type
'grid:foreign-array
:initial-contents
observations
)))
(
sample-variance
(
/
(
sqrt
sum-square-of-residuals
)
(
-
(
grid:dim0
observations
)
2
))))
(
sample-variance
(
/
sum-square-of-residuals
(
-
(
grid:dim0
observations
)
2
))))
(
declare
(
ignore
covariance
))
(
values
slope
intercept
(
*
sample-variance
(
sqrt
slope-variance
))
(
*
sample-variance
(
sqrt
intercept-variance
)))))
(
sqrt
(
*
sample-variance
slope-variance
))
(
sqrt
(
*
sample-variance
intercept-variance
)))))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment