Home > freetb4matlab > statistics > tests > t_test_regression.m

t_test_regression

PURPOSE ^

% Perform an t test for the null hypothesis @code{@var{rr} * @var{b} =

SYNOPSIS ^

function [pval, t, df] = t_test_regression (y, X, R, r, alt)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{pval}, @var{t}, @var{df}] =} t_test_regression (@var{y}, @var{x}, @var{rr}, @var{r}, @var{alt})
% Perform an t test for the null hypothesis @code{@var{rr} * @var{b} =
% @var{r}} in a classical normal regression model @code{@var{y} =
% @var{x} * @var{b} + @var{e}}.  Under the null, the test statistic @var{t}
% follows a @var{t} distribution with @var{df} degrees of freedom.
%
% If @var{r} is omitted, a value of 0 is assumed.
%
% With the optional argument string @var{alt}, the alternative of
% interest can be selected.  If @var{alt} is @code{'~='} or
% @code{'<>'}, the null is tested against the two-sided alternative
% @code{@var{rr} * @var{b} ~= @var{r}}.  If @var{alt} is @code{'>'}, the
% one-sided alternative @code{@var{rr} * @var{b} > @var{r}} is used.
% Similarly for @var{'<'}, the one-sided alternative @code{@var{rr} *
% @var{b} < @var{r}} is used.  The default is the two-sided case. 
%
% The p-value of the test is returned in @var{pval}.
%
% If no output argument is given, the p-value of the test is displayed.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003