Hi Nicholas,

Here is a sample of my database where the projected richness in the future
has been calculated at a previous step. The whole database is quite big
(>700 000 rows)
> tab
       gradient year run             GCM scenario richness
47876     -1.25 2026   1  mri_cgcm2_3_2a  sresa1b        6
580691     1.91 2057   9      gfdl_cm2_0   sresa2       11
577415    -1.07 2014   9        cnrm_cm3   sresa2        6
391304    -3.61 2024   6      gfdl_cm2_0  sresa1b        1
634267    -0.23 2065   9      gfdl_cm2_1   sresb1       10
533301    -4.14 2041   8      gfdl_cm2_0  sresa1b        1
571517    -4.41 2049   8  mri_cgcm2_3_2a   sresb1        2
445719     0.12 2057   7      gfdl_cm2_1   sresa2       11
137573     4.98 2013   2 miroc3_2_medres   sresb1        9
483489     3.85 2099   7        cnrm_cm3   sresb1        8
481805     3.54 2047   7        cnrm_cm3   sresb1        9
315062     4.98 2052   5        cnrm_cm3  sresa1b        8
17288     -0.33 2062   1 miroc3_2_medres   sresa2        5
349755     0.31 2089   5      gfdl_cm2_1   sresb1        7
672608    -0.23 2056  10        cnrm_cm3  sresa1b       10

> str(tab)
'data.frame':   15 obs. of  6 variables:
 $ gradient: num  -1.25 1.91 -1.07 -3.61 -0.23 -4.14 -4.41 0.12 4.98 3.85
...
 $ year    : num  2026 2057 2014 2024 2065 ...
 $ run     : Factor w/ 10 levels "1","2","3","4",..: 1 9 9 6 9 8 8 7 2 7 ...
 $ GCM     : Factor w/ 5 levels "cnrm_cm3","gfdl_cm2_0",..: 5 2 1 2 3 2 5 3
4 1 ...
 $ scenario: Factor w/ 3 levels "sresa1b","sresa2",..: 1 2 2 1 3 1 3 2 3 3
...
 $ richness: num  6 11 6 1 10 1 2 11 9 8 ...


2009/9/29 Nicholas Lewin-Koh <nikko@hailmail.net>

> Hi Clement,
> I am not sure exactly what you are proposing. Is there any data
> or is this all simulated? My first question is why is years ordinal?
> It would seem that richness would vary smoothly from year to year.
>

Yes the richness would vary from year to year but my aim is to underline the
'global' temporal trend, continuously from 2005 to 2100, rather than the
inter-annual variation. That's why I prefer setting "years" like a
continuous/ordinal variable.


> The second question is why is spatial location lumped in with gradient?
> wouldn't a "better" model be something like
>
> rich.fit <- gam(Richness~s(Lat,Long) + s(Gradient) + s(Time),
> family=Gamma())
>

I'm working with streamwater fish communities. At the sampling sites,
"Gradient" was derived as the first axis from Principal Component applied to
geophysical characteristics of the catchments such as altitude, slope,
catchment area and spatial location... Thus, "gradient" is supposed to
represent a well known physical continuum river, from headwater to the
lowlands... I want to use "gradient" in my analysis since I'd like to give,
at the final stage, a 3-plot representation (x,y,z) of my process where
x=years, y=gradient, z='smoothed' richness.

>
> Using the gamma, or Poisson if you want to stay discrete, is probably
> closer to the observed distribution of species richness, which tends to
> be skewed.
>

Yes, why not. However, in this case study the pdf of the richness seems to
be quite "gaussian"...

>
> Now what do you mean by indirect effects from GCM? These could manifest
> as a lagged
> time effect, or second order spatial effects or both or they will
> manifest in the errors.
>

My question was initially to give a spatio-temporal overview of the
differences between scenarios. I know that some other factors like "GCM" ("5
different models) but also "run" (resulting from 10 different species
distribution models applied to derive the species richness) may have a
significant effect on the richness variability. According to my biological
question, the goal would be likely to 'remove' the effect from these two
factors so that the picture representing the differences between scenarios
could be more consistent... Do you understand what I mean...


> Basically you wantto predict 100 years from a model, I would probably
> model more of the
> effects explicitly, so the assumptions are clearer. If you do have data
> for a few years
> I would look at partially specified models (Simon Wood) where some of
> your effects are from smooths
> and the rest are modeled as pde's.
>

Hope this helps to understand better the design.

Clem


>
> Hope this helps.
>
> Nicholas
>
>  ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 28 Sep 2009 12:21:17 +0200
> > From: Cl?ment Tisseuil <tisseuil@cict.fr>
> > Subject: [R-sig-eco] Removing the effect from a qualitative variable
> >       into a  GAM
> > To: r-sig-ecology@r-project.org
> > Message-ID:
> >       <8f656ccd0909280321i5f55526ai76f1eed1161d6d86@mail.gmail.com>
> > Content-Type: text/plain
> >
> > Dear all,
> >
> > I'm investigating the spatial and temporal variability for some
> > biological
> > features of stream fish communities (e.g. richness, diversity), modelled
> > under future climate change according different 5 climate model outputs
> > (GCM) and 3 emissions scenarios (SRES)...
> >
> > One of my goal is to highlight graphically the spatial (characterized by
> > "Gradient" as a quantitative predictor) and temporal (characterized by
> > "Years" from 2005 to 2100 as an ordinal predictor) differences in species
> > richness (Richness) according to the 3 future scenarios. One idea was to
> > fit, individually for each scenario, a generalized additive model, namely
> > Rich.fit=gam(Richness ~ s(gradient) + s(year)), so that the Richness
> > could
> > then be interpolated on a regular xy grid o highlight spatio-temporal
> > patterns of variability.
> >
> > The 'problem' is that I expect some indirect effects in the modelled
> > patterns of richness related to GCM. In this context, I would be
> > interested
> > to remove the effect from these GCM in my models to get a more consistent
> > ideas about the 'real' patterns of differences between scenarios... Do
> > you
> > have any idea for doing that?
> >
> > Best regards,
> >
> > Clement
> >
> > --
> > Clement Tisseuil - PhD student
> >
> > Laboratoire  "Evolution et DiversitÃ© Biologique" (EDB)
> > UMR 5174 - UniversitÃ© Paul Sabatier CNRS
> > 118 route de Narbonne, BÃ¢t 4R3, Porte 112
> > 31062 Toulouse Cedex 9 - France
> > Phone : +33 5 61 55 67 35
> > Fax: +33 5 61 55 67 28
> > webpage: http://www.clement-tisseuil.eu
> >
> >       [[alternative HTML version deleted]]
> >
> >
> >
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

	[[alternative HTML version deleted]]

