R/satterthwaite.R
satterthwaite.SSN2.RdCompute 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, ...)A named numeric vector of Satterthwaite degrees of freedom for each fixed effect.
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.
Rencher, Alvin C. and Schaalje, G. Bruce (2008). Linear Models in Statistics, Second Edition. John Wiley & Sons.
# 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"