Score_test_for_effect_in_the_probit_model_2xc {contingencytables} | R Documentation |
The score test for effect in the cumulative probit model described in Chapter 6 "The Ordered 2xc Table"
Score_test_for_effect_in_the_probit_model_2xc(n, alphahat0)
n |
the observed counts (a 2xc matrix) |
alphahat0 |
a column vector with c-1 estimated coefficients
( |
An object of the contingencytables_result class,
basically a subclass of base::list()
. Use the utils::str()
function
to see the specific elements returned.
Must give the alphahats under the null hypothesis as input, because Matlab does not calculate an intercept-only probit model (and this may apply to R code as well). alphahat0 can be calculated in, for instance, Stata.
# The Adolescent Placement Study (Fontanella et al., 2008)
alphahat0 <- c(-1.246452, -0.5097363, 0.2087471)
Score_test_for_effect_in_the_probit_model_2xc(fontanella_2008, alphahat0)
# Postoperative nausea (Lydersen et al., 2012a)
alphahat0 <- c(-0.1923633, 0.5588396, 1.271953)
Score_test_for_effect_in_the_probit_model_2xc(lydersen_2012a, alphahat0)