[R] GAM model output error(?)

Simon Wood s.wood at bath.ac.uk
Wed Jul 16 22:24:48 CEST 2014


Trevor, Can I just check - were you using the new 'nb' from mgcv version 
 >= 1.8 or the old (and very slow) 'negbin' family? (Not that negative 
binomial seems needed here, but just to know) best, Simon


On 16/07/14 21:16, Trevor Davies wrote:
> Hi Simon,
>
> Thank you so much for being active on this list, it really is
> tremendously helpful.
>
> Thanks you for your insights, I was wondering whether both terms were
> necessary.
>
> As for 'NB wouldn't work' it was a convergence problem (and tremendously
> slow).  There were also issues with the models not giving lack of
> convergence warnings but then the model saying it was not converged and
> vice versa.  The QP seemed to fit the data well (and quickly) so we
> switched to that.
>
> Thanks again.
> Trevor
>
>
> On Wed, Jul 16, 2014 at 12:44 PM, Simon Wood <s.wood at bath.ac.uk
> <mailto:s.wood at bath.ac.uk>> wrote:
>
>     Trevor,
>
>     It looks like you've added a parametric COR.YEARLY.MEAN in addition
>     to your s(cxe,cyn,by=COR.YEARLY.MEAN) term. Because the latter
>     includes a linear effect of COR.YEARLY.MEAN, then the parametric
>     COR.YEARLY.MEAN will not be identifiable, so gam has dropped it.
>
>     I guess from the scale parameter your data are, if anything,
>     under-dispersed relative to Poisson, but perhaps Poisson would have
>     been ok too.
>
>     Could you give a bit more detail on 'NB just wouldn't work' please?
>     What actually happened? (It's new functionality, so having reports
>     when stuff goes wrong is useful).
>
>     best,
>     Simon
>
>
>     On 16/07/14 20:25, Trevor Davies wrote:
>
>         I have run a quasipoisson spatial model via GAM (NB just
>         wouldn't work) and
>         I am getting the following output of one of my parameters
>         (COR.YEARLY.MEAN).  Does this suggest an error in the model fit?
>         The model
>         seems to have converged.  Apologies for the lack of reproducible
>         example
>         but it didn't really seem warranted in this case.  Thank you for the
>         assistance.
>         Trevor
>
>         Parametric coefficients:
>                           Estimate Std. Error t value Pr(>|t|)
>         (Intercept)      -3.7084     0.2185  -16.97   <2e-16 ***
>         COR.YEARLY.MEAN   0.0000     0.0000      NA       NA
>         ---
>
>         Approximate significance of smooth terms:
>                                                      edf Ref.df       F
>           p-value
>         s(PRED_cBOTTOM_TEMPERATURE.__std)          5.008  6.045  24.871
>           < 2e-16 ***
>         s(cxe,cyn)                              28.999 29.000  13.951  <
>         2e-16 ***
>         s(cDMAX.std)                             3.830  4.761 243.895  <
>         2e-16 ***
>         s(cxe,cyn):male.allyear.__intensity.std    8.053  9.923   4.486
>           2.8e-06 ***
>         s(cxe,cyn):female.allyear.__intensity.std  3.733  4.334   5.478
>         0.000149 ***
>         s(cxe,cyn):COR.YEARLY.MEAN              28.979 29.886  28.502  <
>         2e-16 ***
>         s(cxe,cyn):cFISHING_INTENSITY.__std        5.592  6.464  24.330
>           < 2e-16 ***
>         -
>         Rank: 1/169
>         R-sq.(adj) =  0.697   Deviance explained = 64.1%
>         GCV = 0.70372  Scale est. = 0.69061   n = 4575
>
>                  [[alternative HTML version deleted]]
>
>         ________________________________________________
>         R-help at r-project.org <mailto:R-help at r-project.org> mailing list
>         https://stat.ethz.ch/mailman/__listinfo/r-help
>         <https://stat.ethz.ch/mailman/listinfo/r-help>
>         PLEASE do read the posting guide
>         http://www.R-project.org/__posting-guide.html
>         <http://www.R-project.org/posting-guide.html>
>         and provide commented, minimal, self-contained, reproducible code.
>
>
>
>     --
>     Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
>     +44 (0)1225 386603 <tel:%2B44%20%280%291225%20386603>
>     http://people.bath.ac.uk/sw283
>
>


-- 
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603               http://people.bath.ac.uk/sw283



More information about the R-help mailing list