% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twostage.R
\name{survival-helpers}
\alias{survival-helpers}
\alias{survival.twostage}
\alias{alpha2kendall}
\alias{alpha2spear}
\alias{piecewise_twostage}
\alias{piecewise_data}
\alias{matplot.mets.twostage}
\title{Survival Twostage Helpers}
\usage{
survival.twostage(x, ...)

matplot.mets.twostage(object, ...)

alpha2spear(theta, link = 1)

alpha2kendall(theta, link = 0)

piecewise_twostage(
  cut1,
  cut2,
  data = parent.frame(),
  timevar = "time",
  status = "status",
  id = "id",
  covars = NULL,
  covars.pairs = NULL,
  num = NULL,
  method = "optimize",
  Nit = 100,
  detail = 0,
  silent = 1,
  weights = NULL,
  control = list(),
  theta = NULL,
  theta.des = NULL,
  var.link = 1,
  step = 0.5,
  model = "plackett",
  data.return = 0
)

piecewise_data(
  cut1,
  cut2,
  data = parent.frame(),
  timevar = "time",
  status = "status",
  id = "id",
  covars = NULL,
  covars.pairs = NULL,
  num = NULL,
  silent = 1
)
}
\arguments{
\item{x}{a marginal model object (for \code{survival.twostage}).}

\item{...}{additional arguments.}

\item{object}{a twostage model object (for matplot method).}

\item{theta}{initial dependence parameter values.}

\item{link}{if 1, parameters are on log scale (for alpha2kendall/alpha2spear).}

\item{cut1}{vector of cut points for the first time axis.}

\item{cut2}{vector of cut points for the second time axis.}

\item{data}{a data.frame with the survival data.}

\item{timevar}{character name of the time variable.}

\item{status}{character name of the status variable.}

\item{id}{name of the cluster identifier column.}

\item{covars}{optional character vector of covariate names.}

\item{covars.pairs}{optional covariates at the pair level.}

\item{num}{character name of the within-cluster number variable.}

\item{method}{optimization method.}

\item{Nit}{maximum number of iterations.}

\item{detail}{level of detail in output.}

\item{silent}{level of verbosity (1=silent).}

\item{weights}{optional weights.}

\item{control}{optimization control list.}

\item{theta.des}{theta design matrix.}

\item{var.link}{if 1, log-link for variance parameters.}

\item{step}{step size for optimization.}

\item{model}{dependence model: \code{"plackett"} or \code{"clayton.oakes"}.}

\item{data.return}{if 1, return data with model fits.}
}
\description{
Helper functions for the twostage survival dependence models.
}
\details{
\code{survival.twostage} is an alias for \code{survival_twostage}.

\code{alpha2kendall} converts the Clayton-Oakes alpha parameter to Kendall's tau.

\code{alpha2spear} converts the Clayton-Oakes alpha parameter to Spearman's rho.

\code{piecewise_twostage} fits twostage models on piecewise time intervals.

\code{piecewise_data} prepares data for piecewise twostage analysis.

\code{matplot.mets.twostage} produces matplot of twostage baseline estimates.
}
\author{
Klaus K. Holst, Thomas Scheike
}
