[R-sig-ME] fixed effects/log transformations question
Gus Jespersen
jesper at u.washington.edu
Thu Jul 19 01:53:54 CEST 2012
Dr. Bolker,
Thanks for the response. One last question with regard to negative t
values when using log10 transformed data. I am assuming the correct
interpretation of the following output is: if the t value is negative
and you're using log10 data, to get the fixed effect CI, you must add
your own negative sign to 10^(est.+1/96*SE), such that the
backtransformed CI from the output below would be:
([1] "95 % REML Confidence interval"
[1] -0.58261813 0.02578124
becomes
-.295 -1.05
Is this correct,
Thanks again for the help
Gus
[1] "###############NH4 Results Year Two##################"
Data: data.sub
Models:
Mod.NH4.2.2: log10(NH4Nyeartwo) ~ 1 + (1 | pr)
Mod.NH4.2.1: log10(NH4Nyeartwo) ~ 1 + sitett + (1 | pr)
Df AIC BIC logLik Chisq Chi Df Pr(>Chisq)
Mod.NH4.2.2 3 26.427 29.700 -10.2136
Mod.NH4.2.1 4 25.243 29.607 -8.6216 3.1841 1 0.07436 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Linear mixed model fit by REML
Formula: log10(NH4Nyeartwo) ~ 1 + sitett + (1 | pr)
Data: data.sub
AIC BIC logLik deviance REMLdev
30.37 34.73 -11.18 17.24 22.37
Random effects:
Groups Name Variance Std.Dev.
pr (Intercept) 0.010942 0.10460
Residual 0.130473 0.36121
Number of obs: 22, groups: pr, 12
Fixed effects:
Estimate Std. Error t value
(Intercept) 0.7305 0.1086 6.729
sitettToeAdditionsTreatment -0.2784 0.1552 -1.794
[1] "95 % REML Confidence interval"
[1] -0.58261813 0.02578124
Gus Jespersen <jesper <at> u.washington.edu> writes:
>
> Thank you Thierry,
> I have looked through the glht function in multcomp, and have two
> further questions:
>
[snip]
> Yet I get the following error message:
>
> Error in parse(text = ex[i]) : <text>:1:20: unexpected symbol
> 1: sitettMossAddition Treatment
> ^
> Any ideas on what I'm doing wrong here?
It is very likely that the glht function is having trouble
with the spaces in your level names. I would strongly suggest
that you reformulate them as legal R variable names: something like
levels(mydata$myfactor) <- make.names(levels(mydata$myfactor))
should work.
>
> (2) As you can see, I am working with a log10 transformed response
> variable. I'd like to stay with this for homog. of variance reasons,
> and for reporting the "Treatment -Control" CI previously mentioned,
> I'd like to report the backtransformed limits of the CI. At what
> point in this process should the back-transformation happen? When
> attempting this calculation without glht, I am uncertain of where in
> the process to back-transform as well. I had been hoping to simply
> use 10^ for each fixed effect and its SE, as well as each element of
> the vcov matrix, but I fear I am overlooking some basic math here.
Yes, you are. You need to back-transform the confidence intervals,
not the elements and their standard errors. The basic math you
are thinking about is
10^(est+1.96*stderr) !== 10^est+10^(1.96*stderr)
If you back-transform first, the RHS is what you will be doing;
you want the LHS (this is for the upper CI, the obvious parallel
applies for the lower CI)
--
R. Gus Jespersen
PhD Candidate
College of Forest Resources
University of Washington
Box 352100
Seattle, WA 98195-2100
(206) 543-5777
jesper at u.washington.edu
More information about the R-sig-mixed-models
mailing list