Compute Satterthwaite denominator degrees of freedom \(t\)-based (rather than asymptotic \(z\)-based) fixed effect inference in small samples.

# S3 method for class 'ssn_lm'
satterthwaite(object, method, ...)

# S3 method for class 'ssn_glm'
satterthwaite(object, ...)

Arguments

object

A fitted model object from ssn_lm() fit without local. Not supported for ssn_glm() objects.

method

The method by which to compute gradients. Must be supplied as "numeric" for numerical differentiation, the only supported method.

...

Other arguments. Not used (needed for generic consistency).

Value

A named numeric vector of Satterthwaite degrees of freedom for each fixed effect.

Details

Satterthwaite degrees of freedom are generally more appropriate than asymptotic degrees of freedom for small samples. They can be computationally costly for sample sizes exceeding 500; however, for sample sizes this large, they Satterthwaite and asymptotic degrees of freedom should yield very similar inferences.

References

Rencher, Alvin C. and Schaalje, G. Bruce (2008). Linear Models in Statistics, Second Edition. John Wiley & Sons.

Examples

# Copy the mf04p .ssn data to a local directory and read it into R
# When modeling with your .ssn object, you will load it using the relevant
# path to the .ssn data on your machine
copy_lsn_to_temp()
temp_path <- paste0(tempdir(), "/MiddleFork04.ssn")
mf04p <- ssn_import(temp_path, overwrite = TRUE)

ssn_mod <- ssn_lm(
  formula = Summer_mn ~ ELEV_DEM,
  ssn.object = mf04p,
  tailup_type = "exponential",
  additive = "afvArea"
)
satterthwaite(ssn_mod, method = "numeric")
#> Error in satterthwaite(ssn_mod, method = "numeric"): could not find function "satterthwaite"