Re: {dsm} warning message "step size truncated due to divergence"

2,825 views
Skip to first unread message

Eric Rexstad

unread,
Jun 3, 2014, 3:12:36 PM6/3/14
to distance...@googlegroups.com
Ricardo:

The specific reason for the warnings is that inside gam.fit in the mgcv
package, the model you have specified is having difficulty with your
data. In trying to find the best parameter estimates for the model you
have specified, the fitting algorithm is having problems.

Consequently, you should examine the details of the model fit. I
suspect the fit is poor, and quite likely some of the parameters could
not be estimated. All in all, unlikely to be a reliable model for
making predictions. I would not have used the model that was struggling
to be fit for prediction.

Given that you have used this model for prediction, I am not surprised
that some of the prediction grid values are infinite (particularly cells
at the edge of the study area).

My interpretation not having seen your data, is that the model you are
trying to fit is not appropriate for the data you have collected. You
are faced with the options of a) fitting a more simple model (that may
also not fit the data) b) fitting a model that has more biological
relevance or explanatory power; a bivariate (x,y) smooth is not
biologically enlightened and does not incorporate covariates to which
your animals might be responding or c) adding more data. Use more
biological insight when conducting your modelling.

On 28/05/2014 05:30, Ricardo F. de Lima wrote:
> > Dear all,
> >
> > I'm trying to fit a density surface model, following "Spatial models for distance sampling data: recent developments and future directions" (Miller et al. 2013 - Methods in Ecology and Evolution 4 (11): 1001-1010).
> >
> > When I try to fit the model
> > mod1 <- dsm(N ~ s(x, y), hnmodel$ddf, seg, obsal)
> >
> > I get the following:
> > "warning messages:
> > 1: Step size truncated due to divergence
> > 2: Step size truncated due to divergence
> > 3: Step size truncated due to divergence
> > 4: Step size truncated due to divergence
> > 5: Step size truncated due to divergence "
> >
> > Then, when I try to use "predict", 17 grid cells (belonging to 5 groups), in the extreme southern edge of my study area, appear as "Inf", instead of having a value.
> >
> > That is keeping me from mapping the predicted abundance or calculating the abundance for the entire survey area.
> >
> > Can you please help me understanding what this means and how I can get around this? I can send the data and scripts, if needed.
> >
> > Thanks,
> > RICARDO.
> >
> > --
> > distance-sampling list home page:
> > http://www.jiscmail.ac.uk/lists/distance-sampling.html
> > To unsubscribe, go to the home page and click "Join or leave the list",
> > or email jisc...@jiscmail.ac.uk with the following message body:
> > leave distance-sampling
> > Before posting to the list, read the list guidelines at
> > http://www.jiscmail.ac.uk/files/distance-sampling/
> > distance-sampling.welcome
> > Any questions, email the list owner at
> > distance-sam...@jiscmail.ac.uk
> > --
> >

--
Eric Rexstad
Research Unit for Wildlife Population Assessment
Centre for Research into Ecological and Environmental Modelling
University of St. Andrews
St. Andrews Scotland KY16 9LZ
+44 (0)1334 461833
The University of St Andrews is a charity registered in Scotland : No SC013532

--
distance-sampling list home page:
http://www.jiscmail.ac.uk/lists/distance-sampling.html
To unsubscribe, go to the home page and click "Join or leave the list",
or email jisc...@jiscmail.ac.uk with the following message body:
leave distance-sampling
Before posting to the list, read the list guidelines at
http://www.jiscmail.ac.uk/files/distance-sampling/
distance-sampling.welcome
Any questions, email the list owner at
distance-sam...@jiscmail.ac.uk
--
Message has been deleted

Ricardo F. de Lima

unread,
Jun 3, 2014, 3:19:19 PM6/3/14
to distance...@googlegroups.com
Dear all,

I'm trying to fit a density surface model, following "Spatial models for =
distance sampling data: recent developments and future directions" (Mille=
r et al. 2013 - Methods in Ecology and Evolution 4 (11): 1001-1010).=20

When I try to fit the model
mod1 <- dsm(N ~ s(x, y), hnmodel$ddf, seg, obsal)

I get the following:
"warning messages:
1: Step size truncated due to divergence=20
2: Step size truncated due to divergence=20
3: Step size truncated due to divergence=20
4: Step size truncated due to divergence=20
5: Step size truncated due to divergence "

Then, when I try to use "predict", 17 grid cells (belonging to 5 groups),=
in the extreme southern edge of my study area, appear as "Inf", instead =
of having a value.=20

That is keeping me from mapping the predicted abundance or calculating th=
e abundance for the entire survey area.

Can you please help me understanding what this means and how I can get ar=
Reply all
Reply to author
Forward
0 new messages