Learn R Programming

spcadjust (version 0.9)

SPCCUSUMlogreg-class: Class "SPCCUSUMlogreg"

Description

Risk-adjusted CUSUM chart for binary responses based on a logistic regression model.

Arguments

Objects from the Class

Objects can be created by calls of the form new("SPCCUSUMlogreg", ...).

Extends

Class "SPCCUSUMNonpar", directly. Class "SPCCUSUM", by class "SPCCUSUMNonpar", distance 2. Class "SPCchart", by class "SPCCUSUMNonpar", distance 3.

Examples

Run this code
n <- 1000
Xlogreg <- data.frame(x1=rbinom(n,1,0.4), x2=runif(n,0,1), x3=rnorm(n))
xbeta <- -1+Xlogreg$x1*100+Xlogreg$x2+Xlogreg$x3
Xlogreg$y <- rbinom(n,1,exp(xbeta)/(1+exp(xbeta)))
chartlogreg <- new("SPCCUSUMlogreg",Delta= 1, formula="y~x1+x2+x3")
SPCproperty(data=Xlogreg,
            nrep=10,
            property=new("calARLCUSUM",chart=chartlogreg,target=100))
#increase nrep for real applications.

Run the code above in your browser using DataLab