Hi all, I try to understand the output of the summary(model). I make a simple model.> summary(m1anova)Call: glm(formula = peso ~ gen) Deviance Residuals: Min 1Q Median 3Q Max -4.3114 -2.3788 -0.9167 2.1581 5.7856 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.8660 0.9808 4.961 0.000101 *** gen2g 3.8504 1.3870 2.776 0.012459 * --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 (Dispersion parameter for gaussian family taken to be 9.618818) Null deviance: 247.27 on 19 degrees of freedom Residual deviance: 173.14 on 18 degrees of freedom AIC: 105.92 Number of Fisher Scoring iterations: 2 I need the mean and se to make an plotbar (I know to make a plotbar) The mean is easy to get.> tapply(peso,gen,mean)1g 2g 4.8660 8.7164 The values is the same in estimate. But the SE, when I try using tapply the SE is different os the SE of estimates. look> tapply(peso,gen,sd)/sqrt(tapply(peso,gen,length))1g 2g 0.8665567 1.0829789 Why this difference? What SE I can use with mean??? When I use others errors that dont gaussian (poisson, binomial, etc), the mean is easy transformed (exp(x) for poisson) but how to use the SE? I can to use always the SE on the summary(model)? Or need transformation? Thanks Ronaldo -- Hello, GORRY-O!! I'm a GENIUS from HARVARD!! -- | //|\\ [*****************************][*******************] || ( ? ? ) [Ronaldo Reis J?nior ][PentiumIII-600 ] | V [ESALQ/USP-Entomologia, CP-09 ][HD: 30 + 10 Gb ] || / l \ [13418-900 Piracicaba - SP ][RAM: 128 Mb ] | /(lin)\ [Fone: 19-429-4199 r.229 ][Video: SiS620-8Mb ] ||/(linux)\ [chrysopa at insecta.ufv.br ][Modem: Pctel-onboar] |/ (linux) \[ICQ#: 5692561 ][SO: CL 7.0 (2.2.19)] || ( x ) [*****************************][*******************] ||| _/ \_Powered by Conectiva Linux 7.0 D+:) | Lxuser#: 205366 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"Ronaldo Reis Jr." <chrysopa at insecta.ufv.br> writes:> Estimate Std. Error t value Pr(>|t|) > (Intercept) 4.8660 0.9808 4.961 0.000101 *** > gen2g 3.8504 1.3870 2.776 0.012459 * > ---...> > tapply(peso,gen,mean) > 1g 2g > 4.8660 8.7164 > > The values is the same in estimate. > But the SE, when I try using tapply the SE is different os the SE of > estimates. look > > > tapply(peso,gen,sd)/sqrt(tapply(peso,gen,length)) > 1g 2g > 0.8665567 1.0829789 > > Why this difference? What SE I can use with mean???(I assume you are only looking at the intercept, i.e. the mean of group "1g"). glm() assumes a constant SD and uses the pooled SD. Try for illustration: sds <- tapply(peso,gen,sd) lens <- tapply(peso,gen,len) dfs <- lens - 1 sd.pool <- sqrt(sum(sds^2*dfs)/sum(dfs)) sd.pool/sqrt(lens) It's a matter of taste which SE you'd put on a plot. Some people feel that you "shouldn't mix in the other groups" in a mainly descriptive plot, but as soon as any modelling is involved (e.g., age-adjusted means) you pretty much have to extract SE's from the model. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 20 Jun 2002, Ronaldo Reis Jr. wrote:> Hi all, > I try to understand the output of the summary(model). > I make a simple model. > > > summary(m1anova) > > Call: > glm(formula = peso ~ gen) > > Deviance Residuals: > Min 1Q Median 3Q Max > -4.3114 -2.3788 -0.9167 2.1581 5.7856 > > Coefficients: > Estimate Std. Error t value Pr(>|t|) > (Intercept) 4.8660 0.9808 4.961 0.000101 *** > gen2g 3.8504 1.3870 2.776 0.012459 *Some time ago I was interesting in such a thing, but I've solved this problem such a way: m1anova.sum <- summary(m1anova) m1anova.sum$coefficients["gen2g", "Std. Error"] :) With best regards, Timur. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._