It's a piecewise cubic function. All you need are the knots and the coefficients. You can then right down the analytic formula for the integral.

It doesn't need to be numerically integrated.

At 11:57 AM 5/14/2010, David Winsemius wrote:

On May 14, 2010, at 11:41 AM, Claudia Penaloza wrote:

(corrected version of previous posting)

I fit a GAM to turtle growth data following methods in Limpus &
Chaloupka
1997 (http://www.int-res.com/articles/meps/149/m149p023.pdf).

I want to obtain figures similar to Fig 3 c & f in Limpus & Chaloupka
(1997), which according to the figure legend are "expected size-at-age
functions" obtained by numerically integrating "size-specific growth
rate
functions derived using cubic B-spline fit to GAM predicted values".

I was able to fit the cubic-B spline, but I do not know how to
"numerically
integrate" it.

You need to give us the function and the appropriate limits of
integration.


Can anybody help please?

Code and figures here:
https://docs.google.com/fileview?id=0B1cQ7z9xYFl2ZTZhMmMyMjAtYTA3Zi00N2QyLTkxNzMtOGYyMjdiOGU2ZWE4&hl=en

Thank you,
Claudia


================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: r...@lcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to