Residual degrees of freedom for an Emax regression model
Source:R/emaxlogistic-methods.R, R/emaxnls-methods.R
df.residual.RdReturns the residual degrees of freedom, equal to the number of observations minus the number of estimated parameters.
Usage
# S3 method for class 'emaxlogistic'
df.residual(object, ...)
# S3 method for class 'emaxnls'
df.residual(object, ...)Details
For emaxnls objects, the value is obtained directly from the underlying
nls fit. For emaxlogistic objects, it is computed as
nobs(object) - length(coef(object)).
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)
)
df.residual(mod_c)
#> [1] 396
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)
)
df.residual(mod_b)
#> [1] 396