[R] Two repeated warnings when runing gam(mgcv) to analyze my dataset?

Simon Wood s.wood at bath.ac.uk
Mon Dec 17 09:54:29 CET 2007


What mgcv version are you running (and on what platform)?

n Thursday 13 December 2007 17:46, zhijie zhang wrote:
> Dear all,
>  I run the GAMs (generalized additive models) in gam(mgcv) using the
> following codes.
>
> m.gam
> <-gam(mark~s(x)+s(y)+s(lstday2004)+s(ndvi2004)+s(slope)+s(elevation)+disbin
>ary,family=binomial(logit),data=point)
>
>  And two repeated warnings appeared.
> Warnings:
> 1: In gam.fit(G, family = G$family, control = control, gamma = gamma,  ...
> : Algorithm did not converge
>
> 2: In gam.fit(G, family = G$family, control = control, gamma = gamma,  ...
> : fitted probabilities numerically 0 or 1 occurred
>
> Q1: For warning1, could it be solved by changing the value of
> mgcv.toloptions for
> gam.control(mgcv.tol=1e-7)?
>
> Q1: For warning2, is there any impact for the results if the "fitted
> probabilities numerically 0 or 1 occurred" ?  How can i solve it?
>
>  I didn't try the possible solutions for them, because it took such a
> longer time to run the whole programs.
>  Could anybody suggest their solutions?
>  Any help or suggestions are greatly appreciated.
>   Thanks.

-- 
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603  www.maths.bath.ac.uk/~sw283 



More information about the R-help mailing list