Uses the icc() function in the irr package to compute the ICC(A,1) on a stable subset of subjects.

compute_iccA1(
  dat,
  PRO.score = NULL,
  time.var = NULL,
  subject.id = NULL,
  anchor = NULL,
  stable.score = NULL,
  first.timepoint = NULL,
  second.timepoint = NULL
)

Arguments

dat

dataframe with values

PRO.score

specify the COA/PRO score you want to compute ICC of. Can pass multiple scores, e.g. PRO.score = c('Y_comp', 'Y_mcar', 'Y_mar')

time.var

the time variable, should be an ordered factor

subject.id

the subject ID, should be a character variable

anchor

this is the anchor used to condition on the stable subset of subjects

stable.score

this is the anchor score that indicates the subject is stable. For example, use anchor = 'PGIS_delta' and stable.score = 0 to select the subset of stable sujects. Another example would be anchor = 'anchor.groups' and stable.score = 'Maintained'.

first.timepoint

specify the first timepoint to be used in the TRTR computation; default is the first timepoint in your time.var variable

second.timepoint

specifiy the second timepoint to be used in the TRTR computation; default is the final timepoint in your time.var variable

Value

returns a table icc.21 with the values