Learn R Programming

vlad (version 0.2.2)

racusum_discretebeta_arl_sim: Compute ARLs of RA-CUSUM control charts using simulation

Description

Compute ARLs of RA-CUSUM control charts using simulation.

Usage

racusum_discretebeta_arl_sim(r, shape1, shape2, coeff, h, RA = 2, rs = 72,
  RQ = 1)

Arguments

r

Integer Vector. Number of runs.

shape1

Double. Shape parameter \(\alpha\) > 0 of the beta distribution.

shape2

Double. Shape parameter \(\beta\) > 0 of the beta distribution.

coeff

Numeric Vector. Estimated intercept and slope coefficients from a binary logistic regression model.

h

Double. Control Chart limit for detecting deterioration/improvement.

RA

Double. Odds ratio of death under the alternative hypotheses. Detecting deterioration in performance with increased mortality risk by doubling the odds Ratio RA = 2. Detecting improvement in performance with decreased mortality risk by halving the odds ratio of death RA = 1/2.

rs

Integer. Number of intervals between 0 and the maximum risk score.

RQ

Double. Defines the performance of a surgeon with the odds ratio ratio of death. Q.

Value

Returns a single value which is the Run Length.

Examples

Run this code
# NOT RUN {
library(vlad)
m <- 1e3
RLS <- sapply(1:m, racusum_discretebeta_arl_sim, shape1=1, shape2=3, coeff=c(-3.6798, 0.0768),
h=4.5, RA=2,  rs=71+1, RQ=1)
data.frame(cbind(ARL=mean(RLS), ARLSE=sd(RLS)/sqrt(m)))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab