My Question is about the output of the lsmeans() and contrast() functions. Can somebody please explain to me what is the meaning of "lsmeans", "rate", "rate.ratio" And especially "estimate"?
- As far as I know "lsmeans" is a mean estimated from a linear model taking covariates into account. Hence, not simply the group average! However, with only one factor, it is possibly simply the mean of each group-level.
- "rate" is the back transformed "lsmean" in poisson models, and should in this case be average counts of species for each group level.
- "rate.ratio" appears only when pairwise comparisons are made and is more dificult to understand. These are odds ratios. I think odds ratios are very difficult to understand. It should be differences on the logit scale (poisson model) and then back-transformed. Probably this means it is also in units of counts, and hence the differences in the count values.
- Last but not least we have "estimates". These always appear when using different contrast methods, i.e. "effects", "trt.vs.ctrl",.... What do they mean? And what does it mena when they are negative, Is then the LHS less than the RHS? or the other way round?
I'm not a statisitcian, and what I have written here is pretty much sure to be wrong, but where is the source for getting all these informations about modern statistics? I hope you are the source! I love this package, and I'm very thankful that it is available!!
Examples of different Outputs (I shortened a bit [...]):
> lsm <- lsmeans::lsmeans(poisonGLM_1, ~ Factor1);lsm
Factor1 lsmean SE df asymp.LCL asymp.UCL
A_Cm 3.765069 0.06213535 NA 3.643286 3.886852
B_Sp_young 3.295837 0.11111111 NA 3.078063 3.513611
[....]
Confidence level used: 0.95
> summary(lsm, type="response")
Factor1 rate SE df asymp.LCL asymp.UCL
A_Cm 43.16667 2.682176 NA 38.21719 48.75714
B_Sp_young 27.00000 3.000000 NA 21.71630 33.56926
[....]
Confidence level used: 0.95
> summary(pairs(lsm), type="response")
contrast rate.ratio SE df z.ratio p.value
A_Cm - B_Sp_young 1.5987654 0.20353032 NA 3.6858954 0.0021
[....]
P value adjustment: tukey method for comparing a family of 5 estimates
Tests are performed on the linear-predictor scale
> summary(regrid(pairs(lsm)), type="reponse")
contrast rate.ratio SE df z.ratio p.value
A_Cm - B_Sp_young 1.5987654 0.20353032 NA 7.855171 <.0001
[....]
P value adjustment: tukey method for comparing a family of 5 estimates
> lsm2 <- contrast(lsm, "trt.vs.ctrl");lsm2
contrast estimate SE df z.ratio p.value
B_Sp_young - A_Cm -0.46923173 0.1273047 NA -3.6858954 0.0009
C_Sp_int1 - A_Cm 0.10613242 0.1039483 NA 1.0210117 0.6703
D_Sp_int2 - A_Cm 0.07796154 0.1048983 NA 0.7432105 0.8305
E_Sp_old - A_Cm -0.60100101 0.1339601 NA -4.4864179 <.0001
P value adjustment: dunnettx method for 4 tests
I'm probably the only one, but for me as a non-statistician it would be very helpful in general to have detailed explanations of the "output" of functions, included in the help files. The "details" section is soo often not very helpful. If anybody knows about a source of such explanations, please let me know.
