add1-drop1: Add or drop colour classes to RCOX models

add1-drop1R Documentation

Add or drop colour classes to RCOX models

Description

Make a test for adding/dropping all colour classes in scope for an RCOX model.

Usage

## S3 method for class 'rcox'
add1(object, scope, details = 0, trace = 0, ...)

## S3 method for class 'rcox'
drop1(object, scope, details = 0, trace = 0, stat = "wald", ...)

Arguments

object

An RCOX model, an object of class 'rcox'

scope

A set of edge colour classes to be considered for addition or deletion, see 'details'.

details

Control the amount of output created.

trace

For debugging purposes

...

Additional arguments, currently unused.

stat

Either "wald" for a Wald statistic or "dev" for a deviance statistic.

Value

A list with entries * tab: A dataframe with the test results * cc: A list of colour classes

Note

* Note that the keyword 'stat' is not available for add1 because this function expands the current model and hence the Wald statistic is not available.

* Based on fitting a new model for each new ecc, and may hence be slow.

Author(s)

Søren Højsgaard, sorenh@math.aau.dk

See Also

comparecc, stepadd1, stepdrop1.

Examples


data(math)
gc.sat <- ~me:ve:al:st:an
gc.1   <- ~me+ve+al+st+an

m.sat <- rcox(gm=gc.sat, data=math)
m.1   <- rcox(gm=gc.1,   data=math)

t.sat <- drop1(m.sat)
t.sat$tab
t.sat$cc

t.1   <- add1(m.1)
t.1$tab
t.1$cc

hojsgaard/gRc documentation built on March 28, 2024, 7:31 a.m.