YPmodel.lackfittest {YPmodel}R Documentation

Martingale residual-based & contrast-based lack-of-fit tests

Description

Four functions to perform the two lack-of-fit tests (martingale residual-based & contrast-based), to print results, and to draw randomly selected realizations of the process.

Usage


## S3 method for class 'lackfittest'
YPmodel(data, repNum, Internal, ...)
## S3 method for class 'YPmodel.lackfittest'
summary(object, ...)
## S3 method for class 'YPmodel.martint'
plot(x, Internal, ...)
## S3 method for class 'YPmodel.survf'
plot(x, Internal, ...)

Arguments

...

For S4 method only.

data

A properly qualified filename where text data is to be saved, or a dataframe of input data set with three vectors: the event / censoring time (unite: year), the censoring indicator, and the group membership indicator. See the structure of sample data set gastric for instance.

repNum

Number of times the resampling simulations are done.

Internal

A dataframe of internal parameters, used only to perform hypothesis tests and plot (and to accelerate the speed).

x

A dataframe of the two lack-of-fit tests, generated by YPmodel.lackfittest.

object

A dataframe of the two lack-of-fit tests, generated by YPmodel.lackfittest, equally to x (different symbol for S4 method only).

Value

newBest

Value of \hat{\beta} used in the two tests.

pvalu1

p-value from martingale residual-based test.

pvalu2

p-value from contrast-based test.

mobs1

Parameter used in plotting martingale residual-based test.

mobs2

Parameter used inplotting contrast-based test.

obs

Parameter used in plotting martingale residual-based test.

obs2

Parameter used in plotting contrast-based test.

wtildCount1

Parameter used in plotting martingale residual-based test.

lineCount1

Parameter used in plotting martingale residual-based test.

wtildCount2

Parameter used in plotting contrast-based test.

lineCount2

Parameter used in plotting contrast-based test.

Author(s)

Junlong Sun and Song Yang

References

YANG, S. AND ZHAO, Y. (2012). Checking the Short-Term and Long-Term Hazard Ratio Model for Survival Data. Scandinavian Journal of Statistics.

See Also

YPmodel, YPmodel.setRandom

Examples

    library(YPmodel)
    data(gastric)
    LackFitTest <- YPmodel.lackfittest(data=gastric, repNum=100)
    summary.YPmodel.lackfittest(LackFitTest)
    plot(LackFitTest)

    plot.YPmodel.martint(LackFitTest)
    plot.YPmodel.survf(LackFitTest)

[Package YPmodel version 1.4 Index]