TestMonotonicityRE {aihuman}R 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, formula)

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.

formula

A formula of the model to fit.

Value

Message indicating whether the monotonicity assumption holds.

Examples

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


[Package aihuman version 0.1.0 Index]