Dear R-er,
I try to get the standard error of fitted parameters for factors with a
glm, even the reference one:
a <- runif(100)
b <- sample(x=c("0", "1", "2"), size=100, replace = TRUE)
df <- data.frame(A=a, B=b, stringsAsFactors = FALSE)
g <- glm(a ~ b, data=df)
summary(g)$coefficients
# I don't get SE for the reference factor, here 0:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.50384827 0.05616631 8.9706490 2.236684e-14
b1 -0.03598386 0.07496151 -0.4800311 6.322860e-01
b2 0.03208039 0.07063113 0.4541962 6.507023e-01
# Then I try to change the order of factors, for example:
df$B[df$B=="0"] <- "3"
g <- glm(a ~ b, data=df)
summary(g)$coefficients
By I get the same...
Any idea ?
Thanks
Marc
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
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.