Learn R Programming

LogisticDx (version 0.1)

stukel: Stukels test of the logistic link

Description

Calculates Stukels test for a logistic regression model. This determines the appropriateness of the logistic link. Two new covariates, z1 and z2 are generated such that $$z1=0.5*logit^2*I(pi>=0.5), z2=-0.5*logit^2*I(pi

Usage

stukel(object,
    alternative = c("both", "alpha1", "alpha2"))

Arguments

object
An object of class glm
alternative
add both $z1$ and $z2$ to model or just one of the above

Value

  • A list with the following elemens:
  • statisticvalue of statistic
  • parameterdegrees of freedom
  • p.valueif $<0.05$ suggests="" should="" accept="" null="" hypothesis="" that="" logistic="" model="" is="" incorrect="" for="" the="" data<="" description="">
  • alternativealternative
  • methodmethod
  • data.namename of object
  • allstatstatistics for all tests
  • allpardegrees of freedom
  • allpvalall p values

References

http://http://www.stat.ufl.edu/~presnell/Courses/sta7249-2008sp/R/Src/stukel.R{University of Florida}

Examples

Run this code
set.seed(1)
m1 <- genLogiDf(b=3,f=0,c=0,n=50)$model
stukel(m1)

Run the code above in your browser using DataLab