Description Usage Arguments Details Value Examples

Inner maximization of the log-likelihood

1 2 | ```
dynfrail_fit(logfrailtypar, dist, pvfm, Y, Xmat, atrisk, basehaz_line,
mcox = list(), c_vecs, inner_control, return_loglik = TRUE)
``` |

`logfrailtypar` |
A vector containing the natural logarithm of the two parameters ( |

`dist` |
Argument of |

`pvfm` |
Argument of |

`Y` |
A |

`Xmat` |
A model matrix obtained by splitting the original data at all the time points where the frailty process takes new values |

`atrisk` |
A list of various calculations that are used in the maximization process. |

`basehaz_line` |
A vector with the baseline hazard estimate at each right hand side time point from |

`mcox` |
An initial Cox model |

`c_vecs` |
A list of the length equal to the number of clusters; each element contains a vector of the length of different values that |

`inner_control` |
Argument of |

`return_loglik` |
Logical. If |

This is an internal function that is used by `dynfrail`

. It is not recommended to use this directly unless you know exactly what you are doing.
On the other hand, this might be useful if someone wants, for example, to use different maximizers, or to calculate the log-likelihood
at specific values of `theta, lambda`

. Most of the input can be produced by `dynfrail_prep`

.

The log-likelihood if `return_loglik = TRUE`

or a list with the log-likelihood and estimates if `return_loglik = FALSE`

.

1 2 3 4 5 | ```
arglist1 <- dynfrail_prep(Surv(time, status) ~ rx + sex + cluster(litter),
data = rats)
# using list() inside is because of the way that R converts lists and vectors
mod1 <- do.call(dynfrail_fit, c(logfrailtypar = list(log(c(0.5, 0.1))), arglist1))
``` |

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.