I am performing paired t-test as following:
t.test(h1$pureinf_hvar, h1$pureinf_lvar, alternative="greater", Paired=T)
having each column of h1 (pureinf_hvar and pureinf_lvar) consisting of 43 observations each (43 subjects, data on 2 different treatments). Interestingly, the result shows a degree of freedom of 84 (or 83.925 due to Welch adjustment for the degrees of freedom).
I've performed some internet researches and found out that for 2-samples t-tests the df is typically defined as df = 2(n-1). However, for paired t-tests like mine there is just 1 group of subjects getting all treatments, so the df should be n-1, shouldn't it? Why does (Welsh-)t-test show a df of 84 (2*43-2) for paired samples intead of 42 (43-1) with my test?
Thank you in advance!
pairedandPairedare not the same thing. Also, you should useTRUErather thanTbecauseTis a variable, and it's easy for code to write over it. Imagine a session in which you (or some code you ran) has innocently usedTto hold some information. ImagineTgot set to0. Nowpaired=Tandpaired=TRUEproduce different results! In fact now the first thing actually says the same aspaired=FALSE. That's too dangerous. Spell it out asTRUE(you can't accidentally overwriteTRUE). Being sure it's right is better than saving 3 characters. – Glen_b Jan 16 '16 at 00:41