TestMonotonicityRE: Test monotonicity with random effects

View source: R/frequentist_re.R

TestMonotonicityRER Documentation

Test monotonicity with random effects

Description

Test monotonicity using frequentist analysis with random effects for the hearing date of the case.

Usage

TestMonotonicityRE(data, fixed, random)

Arguments

data

A data.frame or matrix of which columns consists of pre-treatment covariates, a binary treatment (Z), an ordinal decision (D), and an outcome variable (Y). The column names of the latter three should be specified as "Z", "D", and "Y" respectively.

fixed

A formula for the fixed-effects part of the model to fit.

random

A formula for the random-effects part of the model to fit.

Value

Message indicating whether the monotonicity assumption holds.

References

Imai, K., Jiang, Z., Greiner, D.J., Halen, R., and Shin, S. (2023). "Experimental evaluation of algorithm-assisted human decision-making: application to pretrial public safety assessment." Journal of the Royal Statistical Society: Series A. <DOI:10.1093/jrsssa/qnad010>.

Examples

data(synth)
data(hearingdate_synth)
synth$CourtEvent_HearingDate <- hearingdate_synth
TestMonotonicityRE(synth,
  fixed = "Y ~ Sex + White + Age +
                   CurrentViolentOffense + PendingChargeAtTimeOfOffense +
                   PriorMisdemeanorConviction + PriorFelonyConviction +
                   PriorViolentConviction + D",
  random = "~ 1|CourtEvent_HearingDate"
)


aihuman documentation built on April 12, 2025, 1:47 a.m.