% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_LME_landmark.R
\name{find_LME_risk_set}
\alias{find_LME_risk_set}
\title{Find the risk set for a landmark model (LME)}
\usage{
find_LME_risk_set(
  data_long,
  x_L,
  x_hor,
  predictors_LME,
  predictors_LME_time,
  responses_LME,
  responses_LME_time,
  individual_id,
  event_time,
  event_status
)
}
\arguments{
\item{data_long}{Data frame in long format i.e. there may be more than one row per individual}

\item{x_L}{Numeric specifying the landmark time(s)}

\item{x_hor}{Numeric specifying the horizon time(s)}

\item{predictors_LME}{Vector of character strings specifying the column names in \code{data_long}
which correspond to the predictor variables in the LME model}

\item{predictors_LME_time}{Vector of character strings specifying the column names in \code{data_long}
which contains the time at which the predictor variables were recorded.
This should either be length 1 or the same length as \code{predictors_LME}.
In the latter case the order of elements must correspond to the order of elements in \code{predictors_LME}.}

\item{responses_LME}{Vector of character strings specifying the column names in \code{data_long}
which correspond to the response variables in the LME model}

\item{responses_LME_time}{Vector of character strings specifying the column names in \code{data_long}
which contain the times at which response variables were recorded. This should either be length 1 or
the same length as \code{responses_LME}. In the latter case the order of elements must correspond to the
order of elements in \code{responses_LME}.}

\item{individual_id}{Character string specifying the column name in \code{data_long} which contains the individual identifiers}

\item{event_time}{Character string specifying the column name in \code{data_long}
which contains the event time}

\item{event_status}{Character string specifying the column name in \code{data_long}
which contains the event status (where 0=censoring, 1=event of interest, if there are competing events these are labelled
2 or above).}
}
\value{
List with elements corresponding to each landmark time in x_L. Each element is a data frame, containing only those individuals
in the risk set at each of the landmark times x_L.
}
\description{
This function is a helper function for \code{fit_LME_landmark}.
}
\details{
This function finds the risk set for each of landmark times in x_L. This means that each of the individuals has a LME value for all predictors_LME at the landmark time and
has not experienced an event up to (and including) the landmark time.
}
\author{
Isobel Barrott \email{isobel.barrott@gmail.com}
}
