Score_test_for_effect_in_the_probit_model_2xc {contingencytables}R Documentation

Score test for effect in the cumulative probit model

Description

The score test for effect in the cumulative probit model described in Chapter 6 "The Ordered 2xc Table"

Usage

Score_test_for_effect_in_the_probit_model_2xc(n, alphahat0)

Arguments

n

the observed counts (a 2xc matrix)

alphahat0

a column vector with c-1 estimated coefficients (alpha_j) under the null hypothesis (beta = 0)

Value

An object of the contingencytables_result class, basically a subclass of base::list(). Use the utils::str() function to see the specific elements returned.

Note

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.

Examples

# 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)


[Package contingencytables version 3.0.0 Index]