[R-sig-ME] Calculating fixed effect contrasts with log-transformed data

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Mon Jul 16 10:53:35 CEST 2012


Dear Gus,

Have a look at glht() from the multcomp package. It allows you to define the contrasts that you are interested in.

Best regards,

Thierry

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx op inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-sig-mixed-models-bounces op r-project.org [mailto:r-sig-mixed-models-bounces op r-project.org] Namens Gus Jespersen
Verzonden: vrijdag 13 juli 2012 20:33
Aan: r-sig-mixed-models op r-project.org
Onderwerp: [R-sig-ME] Calculating fixed effect contrasts with log-transformed data

Greetings,
I doubt this is a particularly interesting question for you mixed model gurus, but here goes.  As you can see in the output below, I have a model with twelve fixed effect parameters.  I am interested in each of the "Treatment" vs. "Control" comparisons for each "site"(in each fixed effect parameter name, these are specified by the text immediately following "sitett"). To produce a 95% CI for such a comparison I was advised to take two steps:

(1) Subtract the Control parameter estimate from the Treatment parameter estimate for each site.
(2) Compute the SE for this comparison via:  sqrt( var(treatment) +
var(control) - 2*cov(treatmentt,control)).  To get these values I am using the vcov matrix for the model.

When I move to log10-transformed data, I am thinking I should backtransform the fixed effects and SE's before moving ahead  with the Control-Treatment comparisons.  However, the calculations become more problematic as ( var(treatment) + var(control) -
2*cov(treatmentt,control)) is consistently negative.  I am uncertain on how to proceed here.  Any advice would be much appreciated.

Thank you,
Gus

Data: data.file.final
Models:
Mod.NO3.1.2: NO3Nyearone ~ 1 + (1 | pr)
Mod.NO3.1.1: NO3Nyearone ~ 1 + sitett + (1 | pr)
            Df    AIC    BIC  logLik  Chisq Chi Df Pr(>Chisq)
Mod.NO3.1.2  3 1163.5 1172.2 -578.72
Mod.NO3.1.1 14 1155.8 1196.7 -563.90 29.637     11   0.001806 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Linear mixed model fit by REML
Formula: NO3Nyearone ~ 1 + sitett + (1 | pr)
   Data: data.file.final
  AIC  BIC logLik deviance REMLdev
 1098 1139 -534.8     1128    1070
Random effects:
 Groups   Name        Variance Std.Dev.
 pr       (Intercept)  33.348   5.7747
 Residual             210.115  14.4954
Number of obs: 137, groups: pr, 72

Fixed effects:
                             Estimate Std. Error t value
(Intercept)                    20.118      4.701   4.280
sitettLepAddition Treatment     3.032      6.069   0.500
sitettMossAddition Control      5.677      6.809   0.834
sitettMossAddition Treatment    9.418      6.648   1.417
sitettMossRemoval Control      -9.951      6.510  -1.529
sitettMossRemoval Treatment    -9.601      6.510  -1.475
sitettSaddle Control          -10.985      6.510  -1.687
sitettSaddle Treatment        -12.269      6.648  -1.846
sitettToeAdditions Control      0.932      6.510   0.143
sitettToeAdditions Treatment  -11.678      6.809  -1.715
sitettToeRemoval Control      -12.351      6.510  -1.897
sitettToeRemoval Treatment    -13.168      6.510  -2.023



--
R. Gus Jespersen
PhD Candidate
College of Forest Resources
University of Washington
Box 352100
Seattle, WA 98195-2100
(206) 543-5777
jesper op u.washington.edu

_______________________________________________
R-sig-mixed-models op r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.



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