I have a dataframe ("mydf") that contains "differences of means".
I wish to test whether these differences are significantly different from zero.
Below, I calculate the t-statistic for each column.
What is a "good" method to calculate/look-up the p-value for each column?
mydf=data.frame(a=c(1,-22,3,-4),b=c(5,-6,-7,9))
mymean=mean(mydf)
mysd=sd(mydf)
mynn=sapply(mydf, function(x) {sum ( as.numeric(x) >= -Inf) })
myse=mysd/sqrt(mynn)
myt=mymean/myse
myt
---------------------------------
Food fight? Enjoy some healthy debate
[[alternative HTML version deleted]]