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.
YPmodel(...)# S3 method for default
YPmodel(data, startPoint, nm, maxIter1, maxIter2, repNum, ...)
# S3 method for YPmodel
print(x, ...)
# S3 method for YPmodel
summary(object, ...)
# S3 method for YPmodel
plot(x, ...)
For S4 method only.
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.
Start point for estimating \(\hat{\beta}\).
Parameter for parameter estimation, to define the upper boundary for the absolute value of \(\hat{\beta}\).
Parameter of out-cycle iteration numbers.
Parameter of inner-cycle iteration numbers.
Number of iterations, to be used in the two lack-of-fit tests.
A dataframe of results from an YPmodel default process.
A dataframe of results from an YPmodel default process, equally to x (different symbol for S4 method only).
An object of class YPmodel, basically a list including elements
A dataframe of source data, generated from input data by YPmodel.inputData.
A dataframe of estimation results, including 1) estimation of \(\hat{\beta}\), 2) its confidential intervals and 3) the odds function of the control group \(\hat{R}(t,\hat{\beta})\), generated by YPmodel.estimate.
A dataframe of hazard ratios and related confidential intervals and bands,
generated by YPmodel.IntervalBands.
A dataframe of the two lack-of-fit tests for the semi-parametric model, generated by YPmodel.lackfittest.
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.
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.
YPmodel.estimate,
YPmodel.IntervalBands,
YPmodel.lackfittest,
YPmodel.adlgrk
# NOT RUN {
library(YPmodel)
data(gastric)
result <- YPmodel(gastric, repNum=100)
summary(result)
plot(result)
# }
Run the code above in your browser using DataLab