Generate t-statistics, p-value and significance

Description

Generate t-statistics, p-value and significance from estimates and its sd. Estimates and its SD is the first and second column respectively

Usage

1
generateSignificance(x, row_names)

Arguments

x

A matrix or data.frame

row_names

names of row

Value

a data.frame

Author(s)

TszKin Julian Chan ctszkin@gmail.com

Examples

1
2
3
4
5
n<-1000
x_data<-cbind(rnorm(n,mean=0),rnorm(n,mean=1))
x_estimates<-cbind(apply(x_data,2,mean),apply(x_data,2,sd)/sqrt(n))
generateSignificance(x_estimates)
generateSignificance(x_estimates,row_names=c("mean0","mean1") )