Hi,

Got my issues sorted.

Error message solved:

I heard from the guy who developed MuMIn and his suggestion worked.

"As for the error you get, it seems you are running an old version of MuMIn.
Please update the package first."

I did (I was only 1 version behind in both R and in MuMIn) and error
disappeared!

Running quasipoisson GAM in MuMIn:
As for my questions on GAM and " to include only models with smooth OR
linear term (but not both) for each variable", as Gavin said, this refers
only to global models with both smooth and linear terms for the
*same*variables....which I didn't have.

Regards,

Karen

On 4 February 2011 12:31, Karen Moore <kmo...@tcd.ie> wrote:

>
> Hi,
>
>  I have a GAM quasipoisson that I'd like to run through MuMIn package
>
>
>    - dredge
>    - gettop.models
>    - model.avg
>
>
> However, I'm having no luck with script from an example in MuMIn help file.
> In MuMIn help they advise "include only models with smooth OR linear term
> (but not both) for each variable". Their example is:
>
> # Example with gam models (based on "example(gam)")
>
> require(mgcv)
>
>
>
> dat <- gamSim(1, n = 500, dist="poisson", scale=0.1)
>
>
>
> gam1 <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3) + (x1+x2+x3)^2, family =
> poisson, data = dat, method = "REML")
>
>
>
> cat(dQuote(getAllTerms(gam1)), "\n")
>
>
>
>
>
> # include only models with smooth OR linear term (but not both) for each
> variable:
>
>
>
>
>
> dd <- dredge(gam1, subset=(!`s(x1)` | !x1) & (!`s(x2)` | !x2) & (!`s(x3)` |
> !x3))
>
>
> But I'm not sure at all how to apply these instructions to my data
>
>
> My formula is
>
> GAM<-gam(Species richness (count) ~ Categorical +  Continous + Continous +
> *s*(Continous ) + Continous : Continous + Continous : Continous,
> family=quasipoisson, data =)
>
>
> Thanks for any advice on script
>
>
> Karen
>
>
>
>
>


-- 
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]]

______________________________________________
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.

Reply via email to