[ADMB Users] Spline advice sought

IanTaylor Ian.Taylor at noaa.gov
Mon Oct 3 16:45:29 PDT 2011


My limited experience indicates that it's easy to overestimate the number of knots that are necessary. Try quarterly or 6-month intervals as one way to make things smoother.
-Ian

----- Reply message -----
From: "Mark Payne" <mpa at aqua.dtu.dk>
To: "users at admb-project.org" <users at admb-project.org>
Subject: [ADMB Users] Spline advice sought
Date: Mon, Oct 3, 2011 1:42 pm


Dear ADMBers,

I have a problem that I was hoping that some of you might be able to give me some advice on.

The situation is that I have a time-series of ten years of daily data (with a substantial number of missing values and some large gaps) that I would like to smooth by fitting a spline to. I have been doing this using ADMB by specifying (monthly) knots as parameters to optimise, and then using the vcubic_spline function to estimate the value of the individual observations at the appropriate time. I then write a likelihood function comparing the fitted and observed values....

The problem that I have is that I can't make the spline "taunt" enough ie depending on how the data sits, the spline has a bad habit of twisting itself up into very steep hairpins and loops that fit the data well, but at the same time don't really make that much "sense" visually or physically. What I'm looking for is a way to achieve a "smoother" fit - I realise that that is a very subjective thing, but that's also why I'm asking for advice....

I believe the problem is that I am giving the individual knots too much freedom - in the current configuration each is allowed to take on essentially any value it likes, independent of all the others, constrained only by the net effect that changes have on the fit. However, when I talk about the "smoothness", I guess I'm saying that I'm looking to include correlation between points that are close together. The problem is that although I get the idea, I don't exactly know how to do this in terms of implementing it in ADMB....

So, what I was wondering was
1. Is what I propose the most sensible approach? Or are there better ways to fit a spline that is nice and smooth?
2. If so, how do I actually implement this? Does anyone have any examples they could share?

Best wishes,

Mark
_______________________________________________
Users mailing list
Users at admb-project.org
http://lists.admb-project.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20111003/3ed0d5f7/attachment.html>


More information about the Users mailing list