Rui,

Thank you very much. Are there other things I have to adjust except for
exchanging "object" by the name of my model?
Torvon

On 29 November 2012 08:17, Rui Barradas <ruipbarradas@sapo.pt> wrote:

> ci_lm <- function(object, level = 0.95){
>      summfit <- summary(object)
>      beta <- summfit$coefficients[, 1]
>      se <- summfit$coefficients[, 2]
>      df <- summfit$df[1]
>      alpha <- 1 - level
>      lower <- beta + qt(alpha/2, df = df)*se
>      upper <- beta + qt(1 - alpha/2, df = df)*se
>      data.frame(beta, lower, upper)
> }
>

	[[alternative HTML version deleted]]


