Re: [R] Should help of estimate in t.test be corrected?
IMHO The difference makes sense for paired samples. For unpaired samples it is just the difference in means. I think presenting the means (and assuming the audience can perform subtraction) conveys more information. The interpretation of a difference of 5 might be influenced if I have means of -3, 2, or 4, 9, or 2000, 2005. Tim -Original Message- From: R-help On Behalf Of Samuel Granjeaud IR/Inserm Sent: Monday, April 3, 2023 7:25 AM To: PIKAL Petr ; r-help@r-project.org Subject: Re: [R] Should help of estimate in t.test be corrected? [External Email] Hi Thanks for your feedback. I didn't think about that. Still, the mean difference is computed for paired, not because there are two samples. IMHO, the help should be updated. Best, Samuel Le 2023-04-03 à 12:10, PIKAL Petr a écrit : > Hi > > You need to use paired option > >> t.test(x=0:4, y=sample(5:9), paired=TRUE)$estimate > mean difference > -5 > > Cheers > Petr > >> -Original Message- >> From: R-help On Behalf Of Samuel >> Granjeaud IR/Inserm >> Sent: Sunday, April 2, 2023 11:39 PM >> To: r-help@r-project.org >> Subject: [R] Should help of estimate in t.test be corrected? >> >> Hi, >> >> Not important, but IMHO the estimate component of the t.test holds an >> estimate of mean of each group, never a difference. The doc says >> "estimatethe estimated mean or difference in means depending on whether >> it >> was a one-sample test or a two-sample test." >> >> > t.test(0:4)$estimate >> mean of x >> 2 >> > t.test(0:4, 5:9)$estimate >> mean of x mean of y >> 2 7 >> >> Best, >> Samuel >> >> __ >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsta >> t.ethz.ch%2Fmailman%2Flistinfo%2Fr-help=05%7C01%7Ctebert%40ufl.e >> du%7Cdd06e263220c464ea0c908db3475a677%7C0d4da0f84a314d76ace60a62331e1 >> b84%7C0%7C0%7C638161452151623376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7 >> C=a7zlFppg4iG2uyMH7mpgyoLTIxXG8F3dx3FPt6YfLdc%3D=0 >> PLEASE do read the posting guide >> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww. >> r-project.org%2Fposting-guide.html=05%7C01%7Ctebert%40ufl.edu%7C >> dd06e263220c464ea0c908db3475a677%7C0d4da0f84a314d76ace60a62331e1b84%7 >> C0%7C0%7C638161452151623376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C >> ta=e%2B0jDRNJRJJ%2BE%2F091LZxD5%2BUhJAz%2FzSjJ7YZhYdFhDk%3D= >> 0 and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help=05%7C01%7Ctebert%40ufl.edu%7Cdd06e263220c464ea0c908db3475a677%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638161452151623376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=a7zlFppg4iG2uyMH7mpgyoLTIxXG8F3dx3FPt6YfLdc%3D=0 PLEASE do read the posting guide https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html=05%7C01%7Ctebert%40ufl.edu%7Cdd06e263220c464ea0c908db3475a677%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638161452151623376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=e%2B0jDRNJRJJ%2BE%2F091LZxD5%2BUhJAz%2FzSjJ7YZhYdFhDk%3D=0 and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Should help of estimate in t.test be corrected?
Hi Thanks for your feedback. I didn't think about that. Still, the mean difference is computed for paired, not because there are two samples. IMHO, the help should be updated. Best, Samuel Le 2023-04-03 à 12:10, PIKAL Petr a écrit : Hi You need to use paired option t.test(x=0:4, y=sample(5:9), paired=TRUE)$estimate mean difference -5 Cheers Petr -Original Message- From: R-help On Behalf Of Samuel Granjeaud IR/Inserm Sent: Sunday, April 2, 2023 11:39 PM To: r-help@r-project.org Subject: [R] Should help of estimate in t.test be corrected? Hi, Not important, but IMHO the estimate component of the t.test holds an estimate of mean of each group, never a difference. The doc says "estimatethe estimated mean or difference in means depending on whether it was a one-sample test or a two-sample test." > t.test(0:4)$estimate mean of x 2 > t.test(0:4, 5:9)$estimate mean of x mean of y 2 7 Best, Samuel __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Should help of estimate in t.test be corrected?
Hallo, you are probably right that "the estimated mean or difference in means depending on whether it was a one-sample test or a two-sample test" should be rephrased to "the estimated mean or difference in means depending on whether it was a one-sample test, two-sample test or two sample paired test" Cheers Petr > -Original Message- > From: Samuel Granjeaud IR/Inserm > Sent: Monday, April 3, 2023 1:25 PM > To: PIKAL Petr ; r-help@r-project.org > Subject: Re: [R] Should help of estimate in t.test be corrected? > > Hi > > Thanks for your feedback. I didn't think about that. > > Still, the mean difference is computed for paired, not because there are two > samples. IMHO, the help should be updated. > > Best, > Samuel > > Le 2023-04-03 à 12:10, PIKAL Petr a écrit : > > Hi > > > > You need to use paired option > > > >> t.test(x=0:4, y=sample(5:9), paired=TRUE)$estimate > > mean difference > > -5 > > > > Cheers > > Petr > > > >> -Original Message- > >> From: R-help On Behalf Of Samuel > >> Granjeaud IR/Inserm > >> Sent: Sunday, April 2, 2023 11:39 PM > >> To: r-help@r-project.org > >> Subject: [R] Should help of estimate in t.test be corrected? > >> > >> Hi, > >> > >> Not important, but IMHO the estimate component of the t.test holds an > >> estimate of mean of each group, never a difference. The doc says > >> "estimatethe estimated mean or difference in means depending on > whether > >> it > >> was a one-sample test or a two-sample test." > >> > >> > t.test(0:4)$estimate > >> mean of x > >> 2 > >> > t.test(0:4, 5:9)$estimate > >> mean of x mean of y > >> 2 7 > >> > >> Best, > >> Samuel > >> > >> __ > >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide > >> http://www.R-project.org/posting-guide.html > >> and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Should help of estimate in t.test be corrected?
Hi You need to use paired option > t.test(x=0:4, y=sample(5:9), paired=TRUE)$estimate mean difference -5 Cheers Petr > -Original Message- > From: R-help On Behalf Of Samuel Granjeaud > IR/Inserm > Sent: Sunday, April 2, 2023 11:39 PM > To: r-help@r-project.org > Subject: [R] Should help of estimate in t.test be corrected? > > Hi, > > Not important, but IMHO the estimate component of the t.test holds an > estimate of mean of each group, never a difference. The doc says > "estimatethe estimated mean or difference in means depending on whether > it > was a one-sample test or a two-sample test." > > > t.test(0:4)$estimate > mean of x > 2 > > t.test(0:4, 5:9)$estimate > mean of x mean of y > 2 7 > > Best, > Samuel > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.