stukel: Stukels test of the logistic link

Description Usage Arguments Value Author(s) References Examples

View source: R/stukel.R

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<=0.5)

where I(arg)=1 where arg is true and =0 where false.

Tests if significant change occurs in the model with the addition of these coefficients.

Usage

1
2
  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:

statistic

value of statistic

parameter

degrees of freedom

p.value

if <0.05 suggests should accept null hypothesis that logistic model is incorrect for the data

alternative

alternative

method

method

data.name

name of object

allstat

statistics for all tests

allpar

degrees of freedom

allpval

all p values

Author(s)

Brett Presnell

References

University of Florida

Examples

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

logisticDx documentation built on May 2, 2019, 6:30 p.m.