Page 1 of 1

qqplot in ttest

Posted: Thu Nov 22, 2018 8:10 am
by vmoreno
Hi,
When performing a ttest, the qq plot sometimes only shows the diagonal line, with no points.
I think I found the problem is when there are missing values in both groups being compared.
The code in ttestISClass should remove NAs in line

pieces <- lapply(pieces, function(y) y - mean(y))

i.e.
pieces <- lapply(pieces, function(y) y - mean(y, na.rm=TRUE))

or remove NAs before for x & y

When NAs are in one group only, points are shown, but I suppose are only for the group without missings.

Re: qqplot in ttest

Posted: Thu Nov 22, 2018 9:28 pm
by jonathon
hi,

could you attach a .omv file, or some example code which does this?

with thanks

Re: qqplot in ttest

Posted: Fri Nov 23, 2018 6:01 am
by vmoreno
Hi,
I noticed the problem analyzing the variable glyhb from the diabetes dataset from here:
http://biostat.mc.vanderbilt.edu/wiki/Main/DataSets

Victor

Re: qqplot in ttest

Posted: Fri Nov 23, 2018 9:16 am
by jonathon
oh yup. fixed, will be in the next release.

and it looks like this :P
Untitled.png
Untitled.png (34.61 KiB) Viewed 3022 times
thanks for reporting

jonathon