[R-sig-ME] GAMM convergence issue with temporal covariate

Hannah L. Linder lindeh at uw.edu
Thu Oct 15 06:14:37 CEST 2015


Great, thank-you both very much for your time and help!

Tom- I appreciate the extra pointers, and will have a deeper look at each.

In addition, I am aware that there are also possible concurvity issues with
time smoother variables. From reading Wood (2011) and the R package
information it seems that the default smoother estimation method protects
against any incorrect parameter estimations due to possible concurvity.
Does this hold true for gamm in mgcv? I could not quite tell based on the
package information.

Thank-you,
Hannah

On Wed, Oct 14, 2015 at 11:49 AM, Philippi, Tom <tom_philippi at nps.gov>
wrote:

> Is your range tidal height at the same location at the time of sampling
> (time & day), or variation among sites in elevation above some datum at the
> (same) time of sampling?  Or does it vary by day but not by time?
>
> If the former, given the predictable way that the tide cycle shifts from
> one day to the next, for some times of the year you're going to have a
> tough time separating out an effect of range from smoothed effects of day
> and time.  If you need to visualize this, pull the NOAA 6 minute tidal
> predictions from somewhere near your site (I can send R code to do this).
> Or, plot a simple heatmap of your data:
>     lattice::levelplot(range~day+time,data=dsn)
>
> Also, be careful with your cyclic fit on time of day.
>     s(time,bs="cc")
> If your time values are not evenly spaced (e.g., full 0:24) you are likely
> to need to specify knots to let gamm know that 0 and 24 are the ends to
> match.  My first guess would be that you need:
>    knots=list(time=c(0,24))
> but I don't know your data, so your mileage will vary.
>
> Tom 2
>
> On Wed, Oct 14, 2015 at 10:19 AM, Highland Statistics Ltd <
> highstat at highstat.com> wrote:
>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Mon, 12 Oct 2015 12:13:44 -0700
> > From: "Hannah L. Linder" <lindeh at uw.edu>
> > To: r-sig-mixed-models at r-project.org
> > Subject: [R-sig-ME] GAMM convergence issue with temporal covariate
> > Message-ID:
> >         <CAF0=RbauKGU3JOsPxBkuka=
> > MBZZU0rZNkAyYt_or4p1h25wmBQ at mail.gmail.com>
> > Content-Type: text/plain; charset="UTF-8"
> >
> > Hello,
> >
> > I am working with a fairly simple model:
> >
> > gamm(sv~s(day,bs="cr")+range+s(time,bs="cc"),correlation=corARMA(p=2,q=2)
> >
> > In which day is Julian Day over one month, range is tidal range, and time
> > is coded 1-24 for hour of day.
> >
> > I continually have singularity convergence problems with this model (the
> > error is:  nlminb
> > problem, convergence error code = 1 message = false convergence (8).
> >
> > Increasing iterations does not help. When I run msVerbose I notice that
> > "day" covariate output values (there are two but I'm not completely sure
> > how to interpret them) keep increasing until the convergence errors
> occur.
> > I have also noticed that setting k=5 for the "day" covariate does not
> help
> > the convergence problem, but k=9 does (the default is 10) or k =20. I
> would
> > greatly appreciate any advice or recommendations on what may be causing
> the
> > problem.
> >
> > Thank-you very much,
> > Hannah
> > --------
> >
> >
> >
> > Hannah,
> >
> > CorARMA(p = 2, q = 2) is not an easy one for the optimisation routine.
> Try
> > simplifying it.
> > Additionally...the ARMA residual correlation structure may be competing
> > with the time smoothers.
> > You could try to use fixed values for the ARMA parameters.
> >
> >
> > Alain Zuur
> >
> >
> > _______________________________________________
> > R-sig-mixed-models at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list