Dear userRs,
when applied the summary function to a glm fit (e.g Poisson) the parameter table provides the categorical variables assuming that the first level estimate (in alphabetical order) is 0. What is the standard error for that variable then? Are the standard errors calculated assuming a normal distribution? Many thanks, |
Hi,
See inline. On Tue, Mar 13, 2012 at 6:38 AM, D_Tomas <[hidden email]> wrote: > Dear userRs, > > when applied the summary function to a glm fit (e.g Poisson) the parameter > table provides the categorical variables assuming that the first level > estimate (in alphabetical order) is 0. > > What is the standard error for that variable then? That is not a variable per se. Say you have a 3 level factor, the default coding is to create two 1/0 vectors, and the parameter estimates and standard errors are for those 'dummy' vectors. Information about the reference group is encoded, there is not an explicit estimate for it with a standard error (notable exception when there are no other variables, the intercept is essentially the reference group, and the other estimates are deviations from that). > > Are the standard errors calculated assuming a normal distribution? I am not completely sure I know what you mean by this. It is assumed that the z value (Estimate/Std. Error) is normally distributed, if that answers your question? Cheers, Josh > > Many thanks, > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Standard-errors-GLM-tp4469086p4469086.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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. -- Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/ ______________________________________________ [hidden email] 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. |
In reply to this post by D_Tomas
On Mar 13, 2012, at 9:38 AM, D_Tomas wrote: > Dear userRs, > > when applied the summary function to a glm fit (e.g Poisson) the > parameter > table provides the categorical variables assuming that the first level > estimate (in alphabetical order) is 0. Not really. It returns an estimate for the contrast of two Poisson parameters which have support on the real line. This is not really the correct list for fixing your misconceptions about GLMs. Your misconceptions are more of a conceptual character rather than an R coding problem. Maybe you should post follow-ups to: stats.stackexchange.com > > What is the standard error for that variable then? It (meaning I assume the coefficient estimate) is not a variable, at least not in the sense of being a data element. > > Are the standard errors calculated assuming a normal distribution? The standard errors are simply the square roots of the diagonals of the variance-covariance matrix (estimated from the deviations on the specified scale of the data from a best fit in a modeling framework). The assumption one makes when turning this into a confidence interval is that _parameters_ are approximately normally distributed using a glm method. You do not necessarily need to accept this method. The 'confint' function in MASS will return CI's based on the profile likelihood. > > Many thanks, > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Standard-errors-GLM-tp4469086p4469086.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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. David Winsemius, MD West Hartford, CT ______________________________________________ [hidden email] 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. |
In reply to this post by D_Tomas
You have a conceptual problem, as pointed out by previous helpers.
You don't have a standard error for the first level of your categorical variable because that level's effect is not estimated. It is being used as a reference level against which the other levels of that categorical variable are being estimated (the default in R). This is one way by which statisticians include categorical predictors into the regression framework, originally meant for relations between continuous quantitative variables. You might want to read about regression, factors, and contrasts. This paper about the issue is available online: M.J. Davis, 2010. Contrast coding in multiple regression analysis: strengths, weaknesses and utility of popular coding structures. Journal of Data Science 8:61-73. HTH Ruben -----Mensaje original----- De: [hidden email] [mailto:[hidden email]] En nombre de D_Tomas Enviado el: martes, 13 de marzo de 2012 14:39 Para: [hidden email] Asunto: [R] Standard errors GLM Dear userRs, when applied the summary function to a glm fit (e.g Poisson) the parameter table provides the categorical variables assuming that the first level estimate (in alphabetical order) is 0. What is the standard error for that variable then? Are the standard errors calculated assuming a normal distribution? Many thanks, -- View this message in context: http://r.789695.n4.nabble.com/Standard-errors-GLM-tp4469086p4469086.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ [hidden email] 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. ______________________________________________ [hidden email] 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. |
Free forum by Nabble | Edit this page |