Paul Johnson
2003-Dec-18 19:27 UTC
[R] diagnostic information in glm. How about N of missing observations?
I handed out some results from glm() and the students ask "how many observations were dropped due to missing values"? How would I know? In other stat programs, the results will typically include N and the number dropped because of missings. Without going back to R and fiddling about to find the total number of rows in the dataframe, there is no way to tell. Somewhat inconvenient. Do you agree? -- Paul E. Johnson email: pauljohn at ku.edu Dept. of Political Science http://lark.cc.ku.edu/~pauljohn 1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
Roger D. Peng
2003-Dec-18 20:02 UTC
[R] diagnostic information in glm. How about N of missing observations?
There should be an element of the fitted model object called `na.action' which (if you used the default na.omit()) should tell you which observations were dropped. -roger Paul Johnson wrote:> I handed out some results from glm() and the students ask "how many > observations were dropped due to missing values"? > > How would I know? > In other stat programs, the results will typically include N and the > number dropped because of missings. Without going back to R and > fiddling about to find the total number of rows in the dataframe, there > is no way to tell. Somewhat inconvenient. Do you agree? >
Gabor Grothendieck
2003-Dec-18 22:35 UTC
[R] diagnostic information in glm. How about N of missing observations?
Check out ?summary.formula in package Hmisc. --- Date: Thu, 18 Dec 2003 13:27:39 -0600 From: Paul Johnson <pauljohn at ku.edu> To: 'r-help at stat.math.ethz.ch' <r-help at stat.math.ethz.ch> Subject: [R] diagnostic information in glm. How about N of missing observations? I handed out some results from glm() and the students ask "how many observations were dropped due to missing values"? How would I know? In other stat programs, the results will typically include N and the number dropped because of missings. Without going back to R and fiddling about to find the total number of rows in the dataframe, there is no way to tell. Somewhat inconvenient. Do you agree? -- Paul E. Johnson email: pauljohn at ku.edu Dept. of Political Science http://lark.cc.ku.edu/~pauljohn 1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66044-3177 FAX: (785) 864-5700 ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Frank E Harrell Jr
2003-Dec-18 23:51 UTC
[R] diagnostic information in glm. How about N of missing observations?
On Thu, 18 Dec 2003 13:27:39 -0600 Paul Johnson <pauljohn at ku.edu> wrote:> I handed out some results from glm() and the students ask "how many > observations were dropped due to missing values"? > > How would I know? > > In other stat programs, the results will typically include N and the > number dropped because of missings. Without going back to R and > fiddling about to find the total number of rows in the dataframe, there > is no way to tell. Somewhat inconvenient. Do you agree? > > -- > Paul E. Johnson email: pauljohn at ku.edu > Dept. of Political Science http://lark.cc.ku.edu/~pauljohn > 1541 Lilac Lane, Rm 504 > University of Kansas Office: (785) 864-9086 > Lawrence, Kansas 66044-3177 FAX: (785) 864-5700 >Fitting functions in the Design package tell you how many observations were deleted due to each variable in the model. They generalize the na.action component stored in the fit object. Frank --- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
Maybe Matching Threads
- controlling usage of digits & scientific notation in R plots; postscript margins
- Users in Ukraine & cyrillic support
- contrast lme and glmmPQL and getting additional results...
- Diagnosing trouble with R-2.0, Fedora Core 2, and Rcmdf
- Predicting and Plotting "hypothetical" values of factors