Re: [R] Weird SEs with effect()

From: Gustaf Granath <gustaf.granath_at_ebc.uu.se>
Date: Sun, 17 Feb 2008 10:20:51 +0100

Hi John,

In fact I am still a little bit confused because I had read the ?effect help and the archives.

?effect says that the confidence intervals are on the linear predictor scale as well. Using exp() on the untransformed confidence intervals gives me the same values as summary(eff). My confidence intervals seems to be correct and reflects the results from my glm models.

But when I use exp() to get the correct SEs on the response scale I get SEs that sometimes do not make sense at all. Interestingly I have found a trend. For my model with adjusted means ~ 0.5-1.5 I get huge SEs (SEs > 1, but my glm model shows significant differences between level 1 = 0.55 and level 2 = 1.15). Models with means around 10-20 my SEs are fine with exp(). Models with means around 75-125 my SEs get way too small with exp().

Something is not right here (or maybe they are but I don not understand it) so I think my best option will be to use the confidence intervals instead of SEs in my plot.

Regards,

Gustaf

> Quoting John Fox <jfox_at_mcmaster.ca>:
>
> Dear Gustaf,
>
> From ?effect, "se: a vector of standard errors for the effect, on the scale
> of the linear predictor." Does that help?
>
> Regards,
> John
>
> --------------------------------
> John Fox, Professor
> Department of Sociology
> McMaster University
> Hamilton, Ontario, Canada L8S 4M4
> 905-525-9140x23604
> http://socserv.mcmaster.ca/jfox
>
>
>> -----Original Message-----
>> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-
>> project.org] On Behalf Of Gustaf Granath
>> Sent: February-16-08 11:43 AM
>> To: r-help_at_r-project.org
>> Subject: [R] Weird SEs with effect()
>>
>> Hi all,
>>
>> Im a little bit confused concerning the effect() command, effects
>> package.
>> I have done several glm models with family=quasipoisson:
>>
>> model <-glm(Y~X+Q+Z,family=quasipoisson)
>>
>> and then used
>>
>> results.effects <-effect("X",model,se=TRUE)
>>
>> to get the "adjusted means". I am aware about the debate concerning
>> adjusted means, but you guys just have to trust me - it makes sense
>> for me.
>> Now I want standard error for these means.
>>
>> results.effects$se
>>
>> gives me standard error, but it is now it starts to get confusing. The
>> given standard errors are very very very small - not realistic. I
>> thought that maybe these standard errors are not back transformed so I
>> used exp() and then the standard errors became realistic. However, for
>> one of my glm models with quasipoisson the standard errors make kind
>> of sense without using exp() and gets way to big if I use exp(). To be
>> honest, I get the feeling that Im on the wrong track here.
>>
>> Basically, I want to know how SE is calculated in effect() (all I know
>> is that the reported standard errors are for the fitted values) and if
>> anyone knows what is going on here.
>>
>> Regards,
>>
>> Gustaf Granath
>>
>> ______________________________________________
>> 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.
>
>



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. Received on Sun 17 Feb 2008 - 09:26:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 17 Feb 2008 - 13:30:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive