Xcode Logger Notes

bs <- coef(m)[-1] V <- vcov(m)[-1, -1] tibble::tibble( diff_estim = diff(bs), diff_SE = sqrt(V[1, 1] + V[2, 2] - 2 * V[1, 2]), t_stat = diff_estim / diff_SE, df = df.residual(m), p_value = 2 * pt(abs(t_stat), df = df, lower.tail = FALSE) )
#> # A tibble: 1 x 5 #> diff_estim diff_SE t_stat df p_value #> <dbl> <dbl> <dbl> <int> <dbl> #> 1 -0.402 0.0251 -16.0 497 6.96e-47This gives the exact same results as the first method! (\(t^2 = (-16)^2 = 256\) is the ... [Read more...]
Copyright © 2022 | MH Corporate basic by MH Themes