Probably no hope of help until you do as the posting guide asks:
> ______________________________________________
> R-help at 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.***
>
-- Bert
On Thu, Jul 14, 2011 at 11:02 AM, Mark Bilton
<mark.bilton at uni-tuebingen.de> wrote:> Hello fellow R users,
>
> I am having a problem finding the estimates for some overall treatment
> effects for my mixed models using 'lme' (package nlme). I hope
someone can
> help.
>
> Firstly then, the model:
> The data: Plant biomass (log transformed)
> Fixed Factors: Treatment(x3 Dry, Wet, Control) Year(x8 2002-2009)
> Random Factors: 5 plots per treatment, 5 quadrats per plot (N=594 (3*5*5*8)
> with 6 missing values).
>
> I am modelling this in two ways, firstly with year as a continuous variable
> (interested in the difference in estimated slope over time in each
treatment
> 'year*treatment'), and secondly with year as a categorical variable
> (interested in difference between 'treatments').
>
> When using Year as a continuous variable, the output of the lme means that
I
> can compare the 3 treatments within my model...
> i.e. it takes one of the Treatment*year interactions as the baseline and
> compares (contrasts) the other two to that.
> I can then calculate the overall treatment*year effect using
> 'anova.lme(Model).
>
> However, the problem comes when I use Year as a categorical variable. Here,
> I am interested solely in the Treatment effect (not the interaction with
> year). However, the output for the two labelled 'Treatment's
against the
> third comparison, are not the overall effect but are a comparison within a
> year (2002). I can still get my overall effect (using anova.lme) but how do
> I calculate the estimates (with P-Values if possible) for each seperate
> overall treatment comparison (not within year). I tried 'glht'
(package
> 'multicomp') but this only works if there are no interactions
present,
> otherwise again it gives a comparison for one particular year.
>
> Very grateful for any assistance,
> Mark
>
> ______________________________________________
> R-help at 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.
>
--
"Men by nature long to get on to the ultimate truths, and will often
be impatient with elementary studies or fight shy of them. If it were
possible to reach the ultimate truths without the elementary studies
usually prefixed to them, these would not be preparatory studies but
superfluous diversions."
-- Maimonides (1135-1204)
Bert Gunter
Genentech Nonclinical Biostatistics