Learn R Programming

YPmodel (version 1.2)

YPmodel.estimate: YPmodel Estimate Parameters.

Description

The main function to fit the short-term and long-term hazard ration model.

Usage

## S3 method for class 'estimate':
YPmodel(data, startPoint, nm, maxIter1, maxIter2, interval, Internal, ...)
## S3 method for class 'YPmodel.estimate':
summary(object,...)
## S3 method for class 'YPmodel.survivor':
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
startPoint
Start point for estimating $\hat{\beta}$.
nm
The upper boundary for the absolute value of $\hat{\beta}$, and the default value is $\log(100)$.
maxIter1
Parameter of out-cycle iteration numbers.
maxIter2
Parameter of inner-cycle iteration numbers.
interval
A binary parameter to control whether or not to perform interval estimation of $\hat{\beta}$, when it is set as 1, the interval estimation will be performed.
Internal
A dataframe of internal parameters, used only to perform hypothesis tests and plot (and to accelerate the speed).
x
A dataframe of estimation results, including estimation of $\hat{\beta}$ and and its confidential intervals and $\hat{R}(t,\hat{\beta})$, generated by YPmodel.estimate.
object
A dataframe of estimation results, including estimation of $\hat{\beta}$ and and its confidential intervals and $\hat{R}(t,\hat{\beta})$, generated by YPmodel.estimate, equally to x (different symb

Value

  • betaValue of $\hat{\beta}$.
  • rValue of $\hat{R}(t,\hat{\beta})$.
  • variance.beta1Variance of the first variable of $\hat{\beta}$.
  • variance.beta2Variance of the second variable of $\hat{\beta}$.

References

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.

See Also

YPmodel

Examples

Run this code
library(YPmodel)
    data(gastric)
    Estimate <- YPmodel.estimate(data=gastric, interval=1)

    Estimate <- YPmodel.estimate(data=gastric, startPoint=c(0,0), nm=log(100))

    Estimate <- YPmodel.estimate(data=gastric, maxIter1=50, maxIter2=20)

    summary(Estimate)

    plot(Estimate)

Run the code above in your browser using DataLab