Re: [R] standard error beta glm

2009-06-12 Thread Ian Fiske


Ricardo Arias Brito wrote:
 
 Dear All,
 
 Is posible calculate Std. Error for glm as lm, using
 cov(hat beta) = phi * solve(t(X) %*% hat W %*% X)^-1
 on R? Who is hat W and phi output glm?
 
 y=rpois(20,4)
 fit.glm - glm(y ~ x, family=poisson
 summary(fit.glm)
 
 Fitted to a model glm using constrast contr.sum and need compute
 the error standard for last level of the factor.
  
 best wishes for all,
 
 Ricardo.
 

Does sqrt(diag(vcov(fit.glm))) not give you what you need?

Ian
-- 
View this message in context: 
http://www.nabble.com/standard-error-beta-glm-tp23987737p24008764.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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] standard error beta glm

2009-06-11 Thread Ricardo Arias Brito

Dear All,

The std. error of the estimated coefficients 
obtained by the summary.lm function can be calculated
as:

y=rnorm(20)
x=y+rnorm(20)
fit - lm(y ~ x)
summary(fit)

sqrt(  sum(fit$resid**2)/fit$df.resid  * 
solve(t(model.matrix(fit))%*%model.matrix(fit))  )

Is posible calculate Std. Error for glm as lm, using
cov(hat beta) = phi * solve(t(X) %*% hat W %*% X)^-1
on R? Who is hat W and phi output glm?

y=rpois(20,4)
fit.glm - glm(y ~ x, family=poisson
summary(fit.glm)


Fitted to a model glm using constrast contr.sum and need compute
the error standard for last level of the factor.
 

best wishes for all,

Ricardo.













  Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

__
R-help@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.