CoxFlex | R Documentation |

Estimate the TD and/or NL effect(s) of continuous covariate(s) in time-to-event analysis

```
CoxFlex(data, Type, variables, TD, NL, m, p, knots)
```

`data` |
A data frame in the long (interval) format with one line per unit of time. |

`Type` |
A vector consisting the name of variables representing the start and stop of each time interval and event indicator. e.g. c("start","stop","event"). |

`variables` |
A vector consisting the name of varialbes that will be adjusted in the model. |

`TD` |
A vector of binary indicators representing whether the corresponding variable has a time-dependent effect or not (1=Yes, 0=No) |

`NL` |
A vector of binary indicators representing whether the corresponding variable has a non-linear effect or not (1=Yes, 0=No) |

`m` |
The number of interior knots used in the regression B-spline |

`p` |
The degree of the regression B-spline |

`knots` |
Default value is -999 |

Returns a list of the following items:

`PLL` |
partial loglikelihood of the final model |

`NP` |
number of parameters estimated in the model |

`NE` |
number of events in the dataset |

`knots_covariates` |
knots for splines of NL effects for corresponding covariates |

`knots_time` |
knots for splines of the TD effect |

`coefficients_splines_NL` |
estimated splines coefficients for NL effects |

`coefficients_splines_TD` |
estimated splines coefficients for TD effects |

`variables` |
name of the covariates in the order they are adjusted in the model |

`coef` |
estimated coefficients for covariates not having TD and NL effects |

`sd` |
standard errors of the corresponding estimated coefficients |

`pval` |
p-values for corresponding estimated effects |

Note that the TD and NL arguments have different meanings than that in the BackSelection()

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.