# RPEXEv1_2: RPEXE main function In RPEXE.RPEXT: Reduced Piecewise Exponential Estimate/Test Software

## Description

This is the RPEXE main function taking inputs including time, censoring, change-point candidates, order restriction, criticl value, and display position. This function produces the RPEXE estimate. The prediction of the survival probability will be made on 100 equally spaced time points within the range of the event times based on the piecewise exponential estimate determined by all the changepoints.

## Usage

 `1` ```RPEXEv1_2(times,censoring,cuttimes=NULL, monotone=0, criticalp=-1, pos = 0) ```

## Arguments

 `times` A sequence of times where the events occur `censoring` A sequence of dichotomous values indicating censored or not (0=censored and 1=not censored) `cuttimes` A vector of unique, sorted, possible times to make the cuts. When it's set to NULL, it's the Default value, which is sorted event times from small to large. `monotone` An input having indicating the monotonicity assumption – 0: no monotonic assumption (default) – 1: failure rate is decreasing over time – 2: failure rate is increasing over time – 3: monotonic failure rate – 4: failure rate is increasing and then decreasing – 5: failure rate is decreasing and then increasing – 6: failure rate is increasing and then decreasing with the peak removed first – 7: failure rate is decreasing and then increasing with the peak removed first `criticalp` The critical (naive) p-value cutoff where all p-values in the backward elimination that are lower than this will be regarded as being significant. For example, at type I error rate 0.05, the critical p-value was 0.004 in the real example of Han et al. (2014). Default == -1 (equivalent to NA). `pos` The position of the legend. Can be 0 or 1. The legend will be on the topright if set to 0. The legend will be on the bottomleft if set to 1. Default is 0.

## Value

times: event/censoring times taking out from the backward elimination pvalues: p-values corresponding to "times" times_c: significant change-points pvalues_c: critical p-values that are smaller than the critical p-value trend: trend information struct: structure information for multiple order restrictions changet: change-point time of trend for umbrella alternatives.

## Examples

 ```1 2 3``` ```t1 <- c(2,3,4,5.5,7,10,12,15) c1 <- c(0,0,1,0,0,1,0,0) RPEXEv1_2(t1, c1, monotone = 1,criticalp=0.05, pos = 0) ```

### Example output

```\$times
[1] 4

\$pvalues
[1] 0.991453

\$times_c
NULL

\$pvalues_c
NULL

\$trend
[1] "Decreasing falilure rate"

\$struct
NULL

\$changet
NULL

\$plotdatakme_times
[1]  2.0  3.0  4.0  5.5  7.0 10.0 12.0 15.0

\$plotdatakme_censoring
[1] 0 0 1 0 0 1 0 0

\$plotdatapexe_t100
[1]  0.15  0.30  0.45  0.60  0.75  0.90  1.05  1.20  1.35  1.50  1.65  1.80
[13]  1.95  2.10  2.25  2.40  2.55  2.70  2.85  3.00  3.15  3.30  3.45  3.60
[25]  3.75  3.90  4.05  4.20  4.35  4.50  4.65  4.80  4.95  5.10  5.25  5.40
[37]  5.55  5.70  5.85  6.00  6.15  6.30  6.45  6.60  6.75  6.90  7.05  7.20
[49]  7.35  7.50  7.65  7.80  7.95  8.10  8.25  8.40  8.55  8.70  8.85  9.00
[61]  9.15  9.30  9.45  9.60  9.75  9.90 10.05 10.20 10.35 10.50 10.65 10.80
[73] 10.95 11.10 11.25 11.40 11.55 11.70 11.85 12.00 12.15 12.30 12.45 12.60
[85] 12.75 12.90 13.05 13.20 13.35 13.50 13.65 13.80 13.95 14.10 14.25 14.40
[97] 14.55 14.70 14.85 15.00

\$plotdatapexe_pred100
[1] 0.9948849 0.9897960 0.9847331 0.9796961 0.9746849 0.9696993 0.9647392
[8] 0.9598045 0.9548950 0.9500107 0.9451513 0.9403168 0.9355070 0.9307218
[15] 0.9259611 0.9212247 0.9165126 0.9118245 0.9071605 0.9025203 0.8979038
[22] 0.8933110 0.8887416 0.8841956 0.8796729 0.8751733 0.8706967 0.8662431
[29] 0.8618122 0.8574039 0.8530182 0.8486550 0.8443140 0.8399953 0.8356987
[36] 0.8314240 0.8271712 0.8229402 0.8187308 0.8145429 0.8103764 0.8062313
[43] 0.8021074 0.7980045 0.7939227 0.7898617 0.7858215 0.7818019 0.7778030
[50] 0.7738244 0.7698663 0.7659283 0.7620106 0.7581128 0.7542350 0.7503770
[57] 0.7465388 0.7427202 0.7389211 0.7351415 0.7313812 0.7276401 0.7239182
[64] 0.7202153 0.7165313 0.7128662 0.7092198 0.7055921 0.7019830 0.6983923
[71] 0.6948199 0.6912659 0.6877300 0.6842122 0.6807124 0.6772305 0.6737664
[78] 0.6703200 0.6668913 0.6634801 0.6600864 0.6567100 0.6533508 0.6500089
[85] 0.6466840 0.6433762 0.6400853 0.6368112 0.6335539 0.6303132 0.6270891
[92] 0.6238815 0.6206903 0.6175154 0.6143568 0.6112143 0.6080879 0.6049774
[99] 0.6018829 0.5988043

\$plotdatapexe_tchange
NULL

\$plotdatapexe_predc
NULL

\$lamest
[1] 29.25
```

RPEXE.RPEXT documentation built on July 1, 2020, 6:02 p.m.