[R-sig-ME] How to test if two gamm-predictions are significantly different?

Karel Viaene karel.viaene at Ugent.be
Wed May 30 10:34:46 CEST 2012

Hi Ken,

the experimental design to which I've fitted the gamm is the following:

Small phytoplankton ecosystems to which a chemical was added (five 
different concentrations + one control treatment).
These ecosystems were followed up through time for 12 weeks. Each week 
the biomass and chemical concentration were calculated/measured.

The gamm I've fitted to this data: biomass = f(time, chemical 
concentration) + error structure

Now I want to determine the lowest chemical concentration where the 
biomass is significantly different from the control treatment, for a 
given point in time (e.g. in week 4, what is the lowest chemical 
concentration for which the biomass is significantly different from the 

I hope this makes it more clear for you.


Op 30/05/2012 2:54, Kenneth Frost schreef:
> Hi, Karel-
> Could you provide a longer sketch of your situation? It is not clear to me what your control treatment is and how it relates to concentration or time.
> Ken
> On 05/29/12, Karel Viaene  wrote:
>> Dear R community,
>> A quick sketch of my situation:
>> I have two continuous explanatory variables ("concentration" and "time")
>> and a continuous response variable, "biomass".
>> I've fitted a gamm model to these data using the package mgcv and want
>> to predict at what concentration the biomass is significantly different
>> from the control treatment (i.e. a concentration of 0) for a given point
>> in time.
>> I've done this by predicting the biomass for a series of 1000
>> concentrations at a given point in time (using "predict"), constructing
>> 95% confidence intervals for these predictions by adding and subtracting
>> 1.96*SE and then selecting the lowest concentration where the two CI
>> show no overlap.
>> However I've realized that this technique is not adequate because two
>> points can also be significantly different at the 5% significance level
>> when the 95% CI do overlap and I want to calculate the lowest possible
>> concentration. I've read some literature about this and am considering
>> the following method:
>> * Calculate the difference between the control (C0) and a predicted
>> point (e.g. C1), thus C0-C1.
>> * Construct a 95% CI for this difference by adding and subtracting
>> 1.96*sqrt(SE0^2 + SE1^2).
>> * Do this for all predictions.
>> * Select the lowest concentration where the 95% CI does not include 0.
>> Could you give me some feedback about this as I'm unsure if this method
>> can be used for gamms. Any comments or suggestions are much appreciated.
>> Many thanks in advance&  kind regards
>> Karel
>> -- 
>> Karel Viaene
>> Ghent University
>> Laboratory of Environmental Toxicology and Aquatic Ecology
>> Plateaustraat 22
>> 9000 Ghent, Belgium
>> tel: +32 (0) 9 264 3779
>> [[alternative HTML version deleted]]
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list