[R-sig-ME] LSmean: transformed error bars

Evan Palmer-Young ecp52 at cornell.edu
Sat Mar 5 17:20:00 CET 2016


Dear R gurus,
I am using the "lsmeans" function to extract predicted marginal means from 
a Poisson family mixed model with a log link function. When I ask for the 
"lsmeans" on the scale of the linear predictor, the standard errors and 
confidence limits are symmetrical about the mean. 
However, I would like to plot the responses on the original scale, so that 
I can depict "number of eggs" rather than "ln(number of eggs)". 

The function "lsmeans" offers this reverse transformation via the argument 
"type='response'". However, I don't understand why there is only one 
standard error after the response. When I manually exponentiate the 
predicted means and CI's from the scale of the linear predictor to the 
scale of the original response variable, my calculations match perfectly. 
However, when I exponentiate the "mean + se" and "mean - se" for plotting 
on the original scale, I get asymmetric bars.

So in lsmeans, what does the "SE" mean when using "type="response""? 
Shouldn't there be separate + and - SE values? 

The SE value seems to be very close to (upperCI-lowerCI)/4, but not 
exactly. Should I plot mean +/- SE using "type="response"" for symmetric 
error bars, or use my manually exponentiated mean +/-SE?

Thanks for your help!
Evan



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