Skip to contents

Equations 2.18 (sums of squares form) and 2.19 (R squared form) of Weisburd et al. (2022). Mirrors ca2e18 / ca2e19.

Usage

morie_f_change(
  ss_resid_restricted = NA,
  ss_resid_full = NA,
  r2_full = NA,
  r2_restricted = NA,
  k_full,
  k_restricted,
  n
)

Arguments

ss_resid_restricted, ss_resid_full

Residual sums of squares.

r2_full, r2_restricted

The two R squared values.

k_full, k_restricted

Predictor counts.

n

Sample size.

Value

List with f_ss (df n - k_full) and f_r2 (df n - k_full - 1); either pair of inputs may be NA to skip that form.

Examples

morie_f_change(ss_resid_restricted = 480, ss_resid_full = 400,
               k_full = 5, k_restricted = 3, n = 100)
#> $df1
#> [1] 2
#> 
#> $f_ss
#> [1] 9.5
#> 
#> $df2_ss
#> [1] 95
#>