tval(x [,df:T]), x a REAL vector or matrix |

tval(x) computes the Student's t-statistic for testing the null hypothesis that the data in REAL vector x have mean zero. When x is a matrix, the results is a vector with the t-statistics for each column of x. tval(x,df:T) produces a structure with two components, 't' containing the t-statistic and 'df' containing the degrees of freedom. When x is a matrix, each component is a vector of length ncols(x). When x contains MISSING values, an informative message is printed. When the null hypothesis mean is something other than zero, say delta, tval(x-delta) will produce the correct t value for that null hypothesis. For example, to test H0: E[x] = 3, use tval(x-3). P values may be computed using the function cumstu() or the macro twotailt(), for example, by Cmd> @result <- tval(x,df:T);twotailt(@result$t,@result$df) See also topics t2val(), tint(), t2int(), cumstu(), and twotailt().

Gary Oehlert 2003-01-15