I've been trying to make a manual t test of a statistic that I calculated in r. I've seen some people recommend to use the function dt but that had not worked. I know because I'm comparing my results of R with my results in STATA (the last ones I'm sure I've got them correct). This is the code with which I'm trying to do this
pvalue<-dt(3.141523, df=8)
Where 3.141523 is my calculated t statistic and df is degrees of freedom. Thank you for your help!
I think you want to use the
pt()
function instead ofdt()
.dt()
is the density whilept()
is the distribution.