[R] Source Code glm() question

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Wed Aug 10 13:25:50 CEST 2011


Just type glm at the prompt.

> glm
function (formula, family = gaussian, data, weights, subset, 
    na.action, start = NULL, etastart, mustart, offset, control = list(...), 
    model = TRUE, method = "glm.fit", x = FALSE, y = TRUE, contrasts = NULL, 
    ...) 
{
    call <- match.call()
    if (is.character(family)) 
        family <- get(family, mode = "function", envir = parent.frame())
    if (is.function(family)) 
        family <- family()

and so on

> -----Oorspronkelijk bericht-----
> Van: r-help-bounces op r-project.org [mailto:r-help-bounces op r-project.org]
> Namens Axel Urbiz
> Verzonden: woensdag 10 augustus 2011 13:16
> Aan: R-help op r-project.org
> Onderwerp: [R] Source Code glm() question
> 
> Dear List,
> 
> I'm fairly new in R. I'd like to see how glm() uses the argument "family" in fitting
> a model. Specifically, I'd like to see how a glm with a gamma family is fitted.
> 
> Thanks for any help,
> Axel.
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help op 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.



More information about the R-help mailing list