Skip to contents

S3 methods for objects of class beezdiscounting_linear returned by fit_dd_linear(). All quantities are closed form; nothing is re-optimized.

Usage

# S3 method for class 'beezdiscounting_linear'
print(x, ...)

# S3 method for class 'beezdiscounting_linear'
summary(object, ...)

# S3 method for class 'summary.beezdiscounting_linear'
print(x, ...)

# S3 method for class 'beezdiscounting_linear'
tidy(x, effects = c("subject", "population"), ...)

# S3 method for class 'beezdiscounting_linear'
glance(x, ...)

# S3 method for class 'beezdiscounting_linear'
coef(object, ...)

# S3 method for class 'beezdiscounting_linear'
confint(object, parm = c("population", "subject"), level = NULL, ...)

# S3 method for class 'beezdiscounting_linear'
augment(x, ...)

# S3 method for class 'beezdiscounting_linear'
predict(object, type = "parameters", ...)

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

# S3 method for class 'beezdiscounting_linear'
logLik(
  object,
  level = c("population", "subject"),
  scale = c("raw", "transformed"),
  ...
)

Arguments

...

Unused; present for S3 generic consistency.

object, x

A beezdiscounting_linear fit (for print.summary(), the object returned by summary()).

effects

For tidy(): "subject" (default) returns the per-unit table; "population" returns the random-effects MLEs mu_<level>, sigma2 and g.

parm

Which interval confint() returns: "population" (default) is an ANOVA-style t-interval on each condition mean, using the between-unit mean square with N - C degrees of freedom; "subject" gives the per-subject t-intervals on ln k. It does not select parameter names.

level

For confint(), the confidence level. NULL (default) means 0.95 for parm = "population", as in the package's other confint() methods, and the fit's conf_level for parm = "subject", so that call reproduces the intervals in tidy() / fit$subjects. For logLik(), which likelihood to return: "population" (the random-effects MLE, df = C + 2) or "subject" (the sum of the per-unit log-likelihoods, df = 2 per unit).

type

For predict(): only "parameters" exists, returning the per-subject ln k and k with their t-intervals (id, condition, logk, logk_lower, logk_upper, k, k_lower, k_upper). There is no newdata prediction; augment() gives the fitted curve.

scale

For logLik(): "raw" (default) is Jacobian-corrected back to the indifference-point scale; "transformed" is on the linearized scale.

Value

print() and print.summary() return their input invisibly; summary() returns an object of class summary.beezdiscounting_linear; tidy(), glance(), augment() and predict() return tibbles. augment() adds .fitted and .resid on the raw indifference-point scale and .std_resid, the transformed-scale residual y_lin - ln k_i divided by the model's error standard deviation (sqrt(sigma2) from the random-effects fit, or the pooled within-subject mean square when that component is unavailable); .std_resid is NA for points dropped under boundary = "drop". coef() returns the named vector of condition means mu; confint() returns a two-column matrix of lower/upper bounds; nobs() returns the number of usable transformed observations; logLik() returns a "logLik" object with df and nobs attributes. Methods needing the random-effects component error when the design was unbalanced and re is NULL.

Details

confint() uses parm to SELECT WHICH INTERVAL is returned, not to filter parameter names as in stats::confint(). logLik() reports the raw-scale (Jacobian-corrected) log-likelihood by default, which makes it comparable with this package's Gaussian NLS and TMB log-likelihoods.