How to report t statistic from R Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm US/Eastern)two-sample t-test VS two one-sample t-tests. What's the difference?non parametric or parametric test for means of groups?How to test difference from 50%Predicting population mean and variance based on sample mean and varianceInconsistent results with median test (Coin-package) RDifferent results with repeated measure correlation (rmcorr) and cor.testHow to interpret Wilcoxon test for small difference in location?What to report for Bootstrapping?Do we assume a t distribution for the estimate of the difference of normal distributions?How to interpret results on different t-tests for the same samples?

A term for a woman complaining about things/begging in a cute/childish way

Random body shuffle every night—can we still function?

How to write capital alpha?

The Nth Gryphon Number

Dyck paths with extra diagonals from valleys (Laser construction)

Does the Mueller report show a conspiracy between Russia and the Trump Campaign?

Would it be easier to apply for a UK visa if there is a host family to sponsor for you in going there?

How long can equipment go unused before powering up runs the risk of damage?

How to report t statistic from R

What to do with repeated rejections for phd position

What would you call this weird metallic apparatus that allows you to lift people?

Did Mueller's report provide an evidentiary basis for the claim of Russian govt election interference via social media?

Draw 4 of the same figure in the same tikzpicture

Lagrange four-squares theorem --- deterministic complexity

How much damage would a cupful of neutron star matter do to the Earth?

Is CEO the "profession" with the most psychopaths?

Significance of Cersei's obsession with elephants?

How to run automated tests after each commit?

How do living politicians protect their readily obtainable signatures from misuse?

Is multiple magic items in one inherently imbalanced?

Why is it faster to reheat something than it is to cook it?

Misunderstanding of Sylow theory

Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?

Is there hard evidence that the grant peer review system performs significantly better than random?



How to report t statistic from R



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm US/Eastern)two-sample t-test VS two one-sample t-tests. What's the difference?non parametric or parametric test for means of groups?How to test difference from 50%Predicting population mean and variance based on sample mean and varianceInconsistent results with median test (Coin-package) RDifferent results with repeated measure correlation (rmcorr) and cor.testHow to interpret Wilcoxon test for small difference in location?What to report for Bootstrapping?Do we assume a t distribution for the estimate of the difference of normal distributions?How to interpret results on different t-tests for the same samples?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2












$begingroup$


I'm wondering how to report the result of a t-test from R given that the degrees of freedom change when the lengths of the vectors are the same.



For example



set.seed(1)
n = 500
x = rnorm(n, 6, 1)
y = rnorm(n, 6, 2)
t = t.test(x,y)
t
t$parameter


Gives the output



> t

Welch Two Sample t-test

data: x and y
t = 1.0924, df = 716.16, p-value = 0.275
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.09130295 0.32035262
sample estimates:
mean of x mean of y
6.022644 5.908119

> t$parameter
df
716.156


Whereas



set.seed(2)
n = 500
x = rnorm(n, 6, 1)
y = rnorm(n, 6, 2)
t = t.test(x,y)
t
t$parameter


Gives the output



> t

Welch Two Sample t-test

data: x and y
t = -0.62595, df = 748.05, p-value = 0.5315
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.2602459 0.1344099
sample estimates:
mean of x mean of y
6.061692 6.124610

> t$parameter
df
748.0475


I'm not sure if it would be typical to report the first as $t(716.15), p = 0.275$ and the second as $t(748.05), p = 0.53$










share|cite|improve this question











$endgroup$


















    2












    $begingroup$


    I'm wondering how to report the result of a t-test from R given that the degrees of freedom change when the lengths of the vectors are the same.



    For example



    set.seed(1)
    n = 500
    x = rnorm(n, 6, 1)
    y = rnorm(n, 6, 2)
    t = t.test(x,y)
    t
    t$parameter


    Gives the output



    > t

    Welch Two Sample t-test

    data: x and y
    t = 1.0924, df = 716.16, p-value = 0.275
    alternative hypothesis: true difference in means is not equal to 0
    95 percent confidence interval:
    -0.09130295 0.32035262
    sample estimates:
    mean of x mean of y
    6.022644 5.908119

    > t$parameter
    df
    716.156


    Whereas



    set.seed(2)
    n = 500
    x = rnorm(n, 6, 1)
    y = rnorm(n, 6, 2)
    t = t.test(x,y)
    t
    t$parameter


    Gives the output



    > t

    Welch Two Sample t-test

    data: x and y
    t = -0.62595, df = 748.05, p-value = 0.5315
    alternative hypothesis: true difference in means is not equal to 0
    95 percent confidence interval:
    -0.2602459 0.1344099
    sample estimates:
    mean of x mean of y
    6.061692 6.124610

    > t$parameter
    df
    748.0475


    I'm not sure if it would be typical to report the first as $t(716.15), p = 0.275$ and the second as $t(748.05), p = 0.53$










    share|cite|improve this question











    $endgroup$














      2












      2








      2





      $begingroup$


      I'm wondering how to report the result of a t-test from R given that the degrees of freedom change when the lengths of the vectors are the same.



      For example



      set.seed(1)
      n = 500
      x = rnorm(n, 6, 1)
      y = rnorm(n, 6, 2)
      t = t.test(x,y)
      t
      t$parameter


      Gives the output



      > t

      Welch Two Sample t-test

      data: x and y
      t = 1.0924, df = 716.16, p-value = 0.275
      alternative hypothesis: true difference in means is not equal to 0
      95 percent confidence interval:
      -0.09130295 0.32035262
      sample estimates:
      mean of x mean of y
      6.022644 5.908119

      > t$parameter
      df
      716.156


      Whereas



      set.seed(2)
      n = 500
      x = rnorm(n, 6, 1)
      y = rnorm(n, 6, 2)
      t = t.test(x,y)
      t
      t$parameter


      Gives the output



      > t

      Welch Two Sample t-test

      data: x and y
      t = -0.62595, df = 748.05, p-value = 0.5315
      alternative hypothesis: true difference in means is not equal to 0
      95 percent confidence interval:
      -0.2602459 0.1344099
      sample estimates:
      mean of x mean of y
      6.061692 6.124610

      > t$parameter
      df
      748.0475


      I'm not sure if it would be typical to report the first as $t(716.15), p = 0.275$ and the second as $t(748.05), p = 0.53$










      share|cite|improve this question











      $endgroup$




      I'm wondering how to report the result of a t-test from R given that the degrees of freedom change when the lengths of the vectors are the same.



      For example



      set.seed(1)
      n = 500
      x = rnorm(n, 6, 1)
      y = rnorm(n, 6, 2)
      t = t.test(x,y)
      t
      t$parameter


      Gives the output



      > t

      Welch Two Sample t-test

      data: x and y
      t = 1.0924, df = 716.16, p-value = 0.275
      alternative hypothesis: true difference in means is not equal to 0
      95 percent confidence interval:
      -0.09130295 0.32035262
      sample estimates:
      mean of x mean of y
      6.022644 5.908119

      > t$parameter
      df
      716.156


      Whereas



      set.seed(2)
      n = 500
      x = rnorm(n, 6, 1)
      y = rnorm(n, 6, 2)
      t = t.test(x,y)
      t
      t$parameter


      Gives the output



      > t

      Welch Two Sample t-test

      data: x and y
      t = -0.62595, df = 748.05, p-value = 0.5315
      alternative hypothesis: true difference in means is not equal to 0
      95 percent confidence interval:
      -0.2602459 0.1344099
      sample estimates:
      mean of x mean of y
      6.061692 6.124610

      > t$parameter
      df
      748.0475


      I'm not sure if it would be typical to report the first as $t(716.15), p = 0.275$ and the second as $t(748.05), p = 0.53$







      r hypothesis-testing t-test reporting






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited 2 hours ago









      Karolis Koncevičius

      2,40141630




      2,40141630










      asked 3 hours ago









      baxxbaxx

      310111




      310111




















          2 Answers
          2






          active

          oldest

          votes


















          2












          $begingroup$

          If you have to report all the details then you should also report the actual t-value, not just degrees of freedom.



          About the degrees of freedom: your degrees of freedom changes because you are using t-test with Welch correction for pooling the variances of the two groups. If your context permits to assume equal variances in both groups you could call the t.test() in the following way:



          t.test(x, y, var.equal=TRUE)


          then you would get the same degrees of freedom for both cases - a whole number dependant on the number of observations. However don't do this just to get a round degrees of freedom value.



          And if Welch t-test is more appropriate in your case consider stating that Welch t-test was used in your report as well.






          share|cite|improve this answer









          $endgroup$




















            2












            $begingroup$

            The Student's t-test assumes both samples having the same variance and in this case the degrees of freedom are simply n1 + n2 - 2. On the other hand, the Welch test does mot make this assumption and in this case you have to calculate the degrees of freedom where the variances of the samples are considered and thus you do not always get the same degrees of freedom for the same sample size. The answer is to report the degrees of freedom as you did (reading it up from the R output).



            EDIT



            I agree with Karolis Koncevičius that you need to report the t value as well, of course. For your first example you would report t(716.16)= 1.09, p= 0.275. Although it depends on the citing format in your discipline how many decimal places you need to report, for example. But I would suggest using the Welch t test as default as it is the case in R "because Welch's t-test performs better than Student's t-test whenever sample sizes and variances are unequal between groups, and gives the same result when sample sizes and variances are equal." (quote from source in link before).






            share|cite|improve this answer










            New contributor




            stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






            $endgroup$













              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "65"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f404032%2fhow-to-report-t-statistic-from-r%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2












              $begingroup$

              If you have to report all the details then you should also report the actual t-value, not just degrees of freedom.



              About the degrees of freedom: your degrees of freedom changes because you are using t-test with Welch correction for pooling the variances of the two groups. If your context permits to assume equal variances in both groups you could call the t.test() in the following way:



              t.test(x, y, var.equal=TRUE)


              then you would get the same degrees of freedom for both cases - a whole number dependant on the number of observations. However don't do this just to get a round degrees of freedom value.



              And if Welch t-test is more appropriate in your case consider stating that Welch t-test was used in your report as well.






              share|cite|improve this answer









              $endgroup$

















                2












                $begingroup$

                If you have to report all the details then you should also report the actual t-value, not just degrees of freedom.



                About the degrees of freedom: your degrees of freedom changes because you are using t-test with Welch correction for pooling the variances of the two groups. If your context permits to assume equal variances in both groups you could call the t.test() in the following way:



                t.test(x, y, var.equal=TRUE)


                then you would get the same degrees of freedom for both cases - a whole number dependant on the number of observations. However don't do this just to get a round degrees of freedom value.



                And if Welch t-test is more appropriate in your case consider stating that Welch t-test was used in your report as well.






                share|cite|improve this answer









                $endgroup$















                  2












                  2








                  2





                  $begingroup$

                  If you have to report all the details then you should also report the actual t-value, not just degrees of freedom.



                  About the degrees of freedom: your degrees of freedom changes because you are using t-test with Welch correction for pooling the variances of the two groups. If your context permits to assume equal variances in both groups you could call the t.test() in the following way:



                  t.test(x, y, var.equal=TRUE)


                  then you would get the same degrees of freedom for both cases - a whole number dependant on the number of observations. However don't do this just to get a round degrees of freedom value.



                  And if Welch t-test is more appropriate in your case consider stating that Welch t-test was used in your report as well.






                  share|cite|improve this answer









                  $endgroup$



                  If you have to report all the details then you should also report the actual t-value, not just degrees of freedom.



                  About the degrees of freedom: your degrees of freedom changes because you are using t-test with Welch correction for pooling the variances of the two groups. If your context permits to assume equal variances in both groups you could call the t.test() in the following way:



                  t.test(x, y, var.equal=TRUE)


                  then you would get the same degrees of freedom for both cases - a whole number dependant on the number of observations. However don't do this just to get a round degrees of freedom value.



                  And if Welch t-test is more appropriate in your case consider stating that Welch t-test was used in your report as well.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered 3 hours ago









                  Karolis KoncevičiusKarolis Koncevičius

                  2,40141630




                  2,40141630























                      2












                      $begingroup$

                      The Student's t-test assumes both samples having the same variance and in this case the degrees of freedom are simply n1 + n2 - 2. On the other hand, the Welch test does mot make this assumption and in this case you have to calculate the degrees of freedom where the variances of the samples are considered and thus you do not always get the same degrees of freedom for the same sample size. The answer is to report the degrees of freedom as you did (reading it up from the R output).



                      EDIT



                      I agree with Karolis Koncevičius that you need to report the t value as well, of course. For your first example you would report t(716.16)= 1.09, p= 0.275. Although it depends on the citing format in your discipline how many decimal places you need to report, for example. But I would suggest using the Welch t test as default as it is the case in R "because Welch's t-test performs better than Student's t-test whenever sample sizes and variances are unequal between groups, and gives the same result when sample sizes and variances are equal." (quote from source in link before).






                      share|cite|improve this answer










                      New contributor




                      stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      $endgroup$

















                        2












                        $begingroup$

                        The Student's t-test assumes both samples having the same variance and in this case the degrees of freedom are simply n1 + n2 - 2. On the other hand, the Welch test does mot make this assumption and in this case you have to calculate the degrees of freedom where the variances of the samples are considered and thus you do not always get the same degrees of freedom for the same sample size. The answer is to report the degrees of freedom as you did (reading it up from the R output).



                        EDIT



                        I agree with Karolis Koncevičius that you need to report the t value as well, of course. For your first example you would report t(716.16)= 1.09, p= 0.275. Although it depends on the citing format in your discipline how many decimal places you need to report, for example. But I would suggest using the Welch t test as default as it is the case in R "because Welch's t-test performs better than Student's t-test whenever sample sizes and variances are unequal between groups, and gives the same result when sample sizes and variances are equal." (quote from source in link before).






                        share|cite|improve this answer










                        New contributor




                        stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.






                        $endgroup$















                          2












                          2








                          2





                          $begingroup$

                          The Student's t-test assumes both samples having the same variance and in this case the degrees of freedom are simply n1 + n2 - 2. On the other hand, the Welch test does mot make this assumption and in this case you have to calculate the degrees of freedom where the variances of the samples are considered and thus you do not always get the same degrees of freedom for the same sample size. The answer is to report the degrees of freedom as you did (reading it up from the R output).



                          EDIT



                          I agree with Karolis Koncevičius that you need to report the t value as well, of course. For your first example you would report t(716.16)= 1.09, p= 0.275. Although it depends on the citing format in your discipline how many decimal places you need to report, for example. But I would suggest using the Welch t test as default as it is the case in R "because Welch's t-test performs better than Student's t-test whenever sample sizes and variances are unequal between groups, and gives the same result when sample sizes and variances are equal." (quote from source in link before).






                          share|cite|improve this answer










                          New contributor




                          stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          $endgroup$



                          The Student's t-test assumes both samples having the same variance and in this case the degrees of freedom are simply n1 + n2 - 2. On the other hand, the Welch test does mot make this assumption and in this case you have to calculate the degrees of freedom where the variances of the samples are considered and thus you do not always get the same degrees of freedom for the same sample size. The answer is to report the degrees of freedom as you did (reading it up from the R output).



                          EDIT



                          I agree with Karolis Koncevičius that you need to report the t value as well, of course. For your first example you would report t(716.16)= 1.09, p= 0.275. Although it depends on the citing format in your discipline how many decimal places you need to report, for example. But I would suggest using the Welch t test as default as it is the case in R "because Welch's t-test performs better than Student's t-test whenever sample sizes and variances are unequal between groups, and gives the same result when sample sizes and variances are equal." (quote from source in link before).







                          share|cite|improve this answer










                          New contributor




                          stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|cite|improve this answer



                          share|cite|improve this answer








                          edited 2 hours ago





















                          New contributor




                          stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 3 hours ago









                          stats.and.rstats.and.r

                          514




                          514




                          New contributor




                          stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          stats.and.r is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Cross Validated!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              Use MathJax to format equations. MathJax reference.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f404032%2fhow-to-report-t-statistic-from-r%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to create a command for the “strange m” symbol in latex? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How do you make your own symbol when Detexify fails?Writing bold small caps with mathpazo packageplus-minus symbol with parenthesis around the minus signGreek character in Beamer document titleHow to create dashed right arrow over symbol?Currency symbol: Turkish LiraDouble prec as a single symbol?Plus Sign Too Big; How to Call adfbullet?Is there a TeX macro for three-legged pi?How do I get my integral-like symbol to align like the integral?How to selectively substitute a letter with another symbol representing the same letterHow do I generate a less than symbol and vertical bar that are the same height?

                              Българска екзархия Съдържание История | Български екзарси | Вижте също | Външни препратки | Литература | Бележки | НавигацияУстав за управлението на българската екзархия. Цариград, 1870Слово на Ловешкия митрополит Иларион при откриването на Българския народен събор в Цариград на 23. II. 1870 г.Българската правда и гръцката кривда. От С. М. (= Софийски Мелетий). Цариград, 1872Предстоятели на Българската екзархияПодмененият ВеликденИнформационна агенция „Фокус“Димитър Ризов. Българите в техните исторически, етнографически и политически граници (Атлас съдържащ 40 карти). Berlin, Königliche Hoflithographie, Hof-Buch- und -Steindruckerei Wilhelm Greve, 1917Report of the International Commission to Inquire into the Causes and Conduct of the Balkan Wars

                              Чепеларе Съдържание География | История | Население | Спортни и природни забележителности | Културни и исторически обекти | Религии | Обществени институции | Известни личности | Редовни събития | Галерия | Източници | Литература | Външни препратки | Навигация41°43′23.99″ с. ш. 24°41′09.99″ и. д. / 41.723333° с. ш. 24.686111° и. д.*ЧепелареЧепеларски Linux fest 2002Начало на Зимен сезон 2005/06Национални хайдушки празници „Капитан Петко Войвода“Град ЧепелареЧепеларе – народният ски курортbgrod.orgwww.terranatura.hit.bgСправка за населението на гр. Исперих, общ. Исперих, обл. РазградМузей на родопския карстМузей на спорта и скитеЧепеларебългарскибългарскианглийскитукИстория на градаСки писти в ЧепелареВремето в ЧепелареРадио и телевизия в ЧепелареЧепеларе мами с родопски чар и добри пистиЕвтин туризъм и снежни атракции в ЧепелареМестоположениеИнформация и снимки от музея на родопския карст3D панорами от ЧепелареЧепелареррр