Get the Number of Observations for a drift_dm Object
Source:R/extended_s3_methods.R
nobs.drift_dm.Rd
This method retrieves the total number of observations in the obs_data
list of a drift_dm
object.
Usage
# S3 method for class 'drift_dm'
nobs(object, ...)
Arguments
- object
a drift_dm object, which contains the observed data in
object$obs_data
.- ...
additional arguments
Value
An integer representing the total number of observations across
all conditions in object$obs_data
.
Details
The function iterates over each element in object$obs_data
, counts
the entries in each nested component, and returns the cumulative sum as the
total observation count.
It was written to provide an nobs
method for calculating the log-likelihood
(logLik), AIC (stats::AIC), and BIC (stats::BIC) statistics
for objects of type drift_dm.