compute_icc21.RdUses the ICC() function in the psych package to compute the ICC(2,1)
on a stable subset of subjects. Note that this is equivalent to the ICC(A,1)
See Intraclass correlation – A discussion and demonstration of basic features
by Liljequist et al 2019. Also see documentation of the psych package.
compute_icc21( dat, PRO.score = NULL, time.var = NULL, subject.id = NULL, anchor = NULL, stable.score = NULL, first.timepoint = NULL, second.timepoint = NULL )
| dat | dataframe with values | 
|---|---|
| PRO.score | specify the COA/PRO score you want to compute ICC of.
Can pass multiple scores, e.g.  | 
| 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  | 
| first.timepoint | specify the first timepoint to be used in the TRTR
computation; default is the first timepoint in your  | 
| second.timepoint | specifiy the second timepoint to be used in the TRTR
computation; default is the final timepoint in your  | 
returns a table icc.21 with the values