deepankardatta / blandr

blandr: a Bland-Altman Method Comparison package for R
21 stars 11 forks source link

Enhancement: calculating multiple measurements per subject #3

Open deepankardatta opened 6 years ago

deepankardatta commented 6 years ago

See https://github.com/deepankardatta/blandr/commit/61daff61822dfc46903196e48e3b2be5eb4f23b3#commitcomment-28490104

I also use commercial software (Medcalc) which has an interesting option "Bland-Altman plot with multiple measurements per subject". Here you can take a look: https://www.medcalc.org/manual/blandaltmanmultiple.php Could it be a suggestion for an addition?

jmcurran commented 5 years ago

It seems the key element is here:

True value is constant in each subject: Select this option if the true value is constant in each subject (e.g. with both methods several measurements were performed on the same sample). In the True value is constant in each subject model (see Bland & Altman, 2007) there is only one marker for each subject in the graph. The marker size is relative to the number of observations for the subject. The number of markers is equal to the number of subjects.

In the alternative model, where the True value varies, there is one marker for each observation pair.

I don't know how to do this in ggplot, but it can't be too hard as it isn't in base R. The key parameter is usually cex or something very similar