Extract the Number of Observations from a Fit.
Extract the number of
## S3 method for class 'default': nobs(object, use.fallback = FALSE, ...)
- A fitted model object.
- logical: should fallback methods be used to try to guess the value?
- Further arguments to be passed to methods.
This is a generic function, with an S4 generic in package
"logLik", as well as a default method (which throws an
use.fallback = TRUE when it looks for
residuals components -- use with care!).
The main usage is in determining the appropriate penalty for BIC, but
nobs is also used by the stepwise fitting methods
drop1 as a
quick check that different fits have been fitted to the same set of
data (and not, say, that further rows have been dropped because of NAs
in the new predictors).
nls fits, observations with zero
weight are not included.
- A single number, normally an integer. Could be