YPmodel: A main function of package of model of short-term and...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/YPmodel.R

Description

The main function to perform parameter estimation and hypothesis testing. The corresponding S4 functions, plot.Y Pmodel and print.Y Pmodel, are also included to demonstrate the results.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
YPmodel(...)

## Default S3 method:
YPmodel(data, startPoint, nm, maxIter1, maxIter2, repNum, ...)
## S3 method for class 'YPmodel'
print(x, ...)
## S3 method for class 'YPmodel'
summary(object, ...)
## S3 method for class 'YPmodel'
plot(x, ...)

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.

startPoint

Start point for estimating \hat{β}.

nm

Parameter for parameter estimation, to define the upper boundary for the absolute value of \hat{β}.

maxIter1

Parameter of out-cycle iteration numbers.

maxIter2

Parameter of inner-cycle iteration numbers.

repNum

Number of iterations, to be used in the two lack-of-fit tests.

x

A dataframe of results from an YPmodel default process.

object

A dataframe of results from an YPmodel default process, equally to x (different symbol for S4 method only).

Value

An object of class YPmodel, basically a list including elements

Data

A dataframe of source data, generated from input data by YPmodel.inputData.

Estimate

A dataframe of estimation results, including 1) estimation of \hat{β}, 2) its confidential intervals and 3) the odds function of the control group \hat{R}(t,\hat{β}), generated by YPmodel.estimate.

IntervalBands

A dataframe of hazard ratios and related confidential intervals and bands, generated by YPmodel.IntervalBands.

LackFitTest

A dataframe of the two lack-of-fit tests for the semi-parametric model, generated by YPmodel.lackfittest.

Adlgrk

A dataframe of the two lack-of-fit tests, to test the hypothesis of equal distribution function in the two groups, generated by YPmodel.adlgrk.

Author(s)

Junlong Sun and Song Yang

References

1) YANG, S. AND PRENTICE, R. L. (2010). Improved Logrank-Type Tests for Survival Data Using Adaptive Weights. Biometrics 66, 30-38. 2) YANG, S. AND PRENTICE, R. L. (2005). Semiparametric analysis of short-term and long-term hazard ratios with two-sample survival data. Biometrika 92, 1-17. 3) 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.estimate, YPmodel.IntervalBands, YPmodel.lackfittest, YPmodel.adlgrk

Examples

1
2
3
4
5
library(YPmodel)
data(gastric)
result <- YPmodel(gastric, repNum=100)
summary(result)
plot(result)

junlongsun/YPmodel documentation built on Oct. 25, 2020, 2:26 a.m.