The documentation for glm/glm.fit indicates that the family argument "can
be a character string naming a family function, a family function or the
result of a call to a family function".

glm.fit(1, 1, family = "gaussian")

## Error: $ operator is invalid for atomic vectors

glm.fit(1, 1, family = gaussian)

​## Error: object of type 'closure' is not subsettable

glm.fit(1, 1, family = gaussian())  # works​, results omitted

sessionInfo()

## R version 3.1.2 Patched (2015-02-20 r67856)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 7 x64 (build 7601) Service Pack 1

## locale:
## [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252
## [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

## [5] LC_TIME=English_United States.1252

## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base

## loaded via a namespace (and not attached):
## [1] tools_3.1.2


-- 
Mathew W. McLean
Research Assistant Professor
462 Blocker Building
Texas A&M University
www.stat.tamu.edu/~mmclean

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to