SPCModellogregLikRatio: Data Model for Binary Responses using a logarithmic model and...

Description Usage Arguments Examples

View source: R/logreg.R

Description

Data Model for Binary Responses using a logarithmic model and likelihood ratio updates.

Usage

1

Arguments

formula

The formula of the model.

Delta

This value will be added to the log odds ratio in the out-of-control model in the likelihood ratio between the out-of-control and the in-control model constituting the updates.

Examples

1
2
3
4
5
6
7
8
9
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("SPCCUSUM",
                   model=SPCModellogregLikRatio(Delta= 1, formula="y~x1+x2+x3"))
SPCproperty(data=Xlogreg,nrep=10,property="calARL",
            chart=chartlogreg,params=list(target=100))
#increase nrep for real applications.

spcadjust documentation built on May 29, 2017, 10:05 a.m.