Thanks for that Gavin - yeah you're right that was not my actual model,
which is:

GAMV2c<-gam(VASCSR~ROTATION+ CANCOV +LAreaoldwood+  + s(SOILPH) +
CANCOV:LAreaoldwood +

CANCOV:SOILPH,family=quasipoisson, data =HIGHBRYOSR)

For MMI the script I use, and have used successfully with *exactly* same GAM
with a poisson distribution, is:


   - ddGAMV2c<-dredge(GAMV2c)
   -  ddGAMV2c

The above 2 steps run fine

   -  top.models4_GAMV2c<-get.models(ddGAMV2c, subset = delta <= 4,
   method="REML")

 So after request for "top.models" I get error
* Error in update.formula(formula(object), formula.) : formula expected*

And this is were I'm stumbling.

I also tried

   - bestGAMV2c <- get.models(ddGAMV2c, cumsum(weight) <= .95)


*Error in update.formula(formula(object), formula.) : formula expected*

Again any help with this would be much appreciated as out of the 4 models
I'm running through MMI for my data this is only one giving me problems
(again all of the above script works fine with *exactly* same GAM model with
a poisson distribution!)

Regards,

Karen




On 4 February 2011 12:47, Gavin Simpson <gavin.simpson@ucl.ac.uk> wrote:

> On Fri, 2011-02-04 at 12:31 +0000, Karen Moore wrote:
> > Hi,
> >
> <snip />
> > My formula is
> >
> > GAM<-gam(Species richness (count) ~ Categorical +  Continous + Continous
> + *
> > s*(Continous ) + Continous : Continous + Continous : Continous,
> > family=quasipoisson, data =)
>
> Ok, I'm reasonably certain that that is *not* your gam() call. Why not
> post the *actual* code you would enter for your GAM model?
>
> dd <- dredge(GAM)
>
> should evaluate all possible models from the global model you specified.
> The example you quote is for a global model with both smooth and linear
> terms for the same variables, hence in dredge() they need to select
> models that include only the smooth for a particular variable or the
> linear term for that variable, but not both.
>
> By the looks of it, you don't have this problem.
>
> G
>
> >
> > Thanks for any advice on script
> >
> >
> > Karen
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> --
> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
>  Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
>  ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
>  Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
>  Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/<http://www.ucl.ac.uk/%7Eucfagls/>
>  UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
>
>
>


-- 
Karen Moore
PhD Researcher,
FORESTBIO,
Department of Botany,
Trinity College Dublin
Ireland

Ph: 00 353 (0)87 9422 502

http://www.ucc.ie/en/planforbio

	[[alternative HTML version deleted]]

