Skip to contents

Returns the number of observations used when fitting the model.

Usage

# S3 method for class 'emaxnls'
nobs(object, ...)

Arguments

object

An emaxnls or emaxlogistic object

...

Ignored

Value

A numeric scalar

Details

This reflects the actual number of rows passed to the fitting algorithm after any missing-value handling specified via the na.action option in emax_nls_options() or emax_logistic_options(). The value is used internally by BIC() and df.residual().

Examples

mod_c <- emax_nls(
  structural_model = rsp_1 ~ exp_1,
  covariate_model = list(E0 ~ cnt_a, Emax ~ 1, logEC50 ~ 1),
  data = emax_df,
  opts = emax_nls_options(max_time = 10)
)
nobs(mod_c)
#> [1] 400

mod_b <- emax_logistic(
  structural_model = rsp_2 ~ exp_1,
  covariate_model = list(E0 ~ cnt_a, Emax ~ 1, logEC50 ~ 1),
  data = emax_df,
  opts = emax_logistic_options(max_time = 10)
)
nobs(mod_b)
#> [1] 400