[R] NA-handling in glm.fit?

2006-10-13 Thread Fredrik Thuring


Dear Sir or Madam,

I'm wondering if there is any routine or argument in the function 'glm.fit'
that makes it handle NA's. The function 'glm' can handle NA's but I can't
make make it work (or find anything written on this in the help files) with
'glm.fit'.
Is it even possible in'glm.fit'? How?

Thanks before hand,
Fredrik Thuring, Business Researcher
__
Codan Forsikring, Gammel Kongevej 60, DK-1790 Copenhagen V
tele: +45 33 55 26 63, fax: +45 33 55 21 22
e-mail: [EMAIL PROTECTED]
http://www.codan.dk
--
This e-mail and any attachment may be confidential and may a...{{dropped}}

__
R-help@stat.math.ethz.ch 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.


Re: [R] NA-handling in glm.fit?

2006-10-13 Thread Gavin Simpson
On Fri, 2006-10-13 at 12:51 +0200, Fredrik Thuring wrote:
 
 Dear Sir or Madam,
 
 I'm wondering if there is any routine or argument in the function 'glm.fit'
 that makes it handle NA's. The function 'glm' can handle NA's but I can't
 make make it work (or find anything written on this in the help files) with
 'glm.fit'.
 Is it even possible in'glm.fit'? How?
 
 Thanks before hand,
 Fredrik Thuring, Business Researcher

glm() deals with NAs etc via the na.action argument, which is missing
from glm.fit. glm is a wrapper around glm.fit, so look at the code of
glm and see how it handles NAs when generating the x and y arguments
that go into glm.fit.

You should also look at ?glm which points to ?na.omit and look at
options(na.action) to set what your setting is currently. You'll
probably want to run na.omit or na.exlude on a combination of the
response and predictor matrix (the arguments you are passing as x and y
to glm.fit) to remove incomplete cases.

HTH

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Gavin Simpson [t] +44 (0)20 7679 0522
 ECRC  ENSIS, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/cv/
 London, UK. WC1E 6BT. [w] http://www.ucl.ac.uk/~ucfagls/
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

__
R-help@stat.math.ethz.ch 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.