qqplot in ttest

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
vmoreno
Posts: 21
Joined: Mon Jun 05, 2017 6:04 pm

qqplot in ttest

Post 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.
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: qqplot in ttest

Post by jonathon »

hi,

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

with thanks
vmoreno
Posts: 21
Joined: Mon Jun 05, 2017 6:04 pm

Re: qqplot in ttest

Post 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
Attachments
Sample output
Sample output
analysis.png (172.98 KiB) Viewed 2846 times
diabetes.omv
Sample data
(55.12 KiB) Downloaded 331 times
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: qqplot in ttest

Post 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 2837 times
thanks for reporting

jonathon
Post Reply