Next: yhat() Up: Regression Macros Help File Previous: testbeta()   Contents

testestim()

Usage:
testestim(x, hypValue), x REAL scalar or vector with no MISSING
  elements, hypValue a non MISSING REAL scalar



Keywords: regression, hypothesis test
You can use macro testestim() to test a null hypothesis of the form
H0: E(y|x) = hypValue or E(y|x1,x2,...,xk) = hypValue, where hypValue
is a hypothesized value for the expectation of y for given x values.
You must previously have run regress("y=x") or regress("y=x1+...+xk").

testestim(x, hypValue), where hypValue is the hypothesized value, x is
a scalar (simple linear regression) or a vector of length k (multiple
regression) returns a t-statistic of for testing H0.  It is an error if
there is not an active regression model or if length(x) != k.

testestim(x, hypValue, df:T) does the same except the result is
structure(tstat:tvalue, df:errorDF), where errorDF is the error degrees
of freedom needed to compute a P-value or find a critical value.

testestim(x, hypValue [,df:T] , pvalue:T) does the same except the
result is structure(tstat:tvalue [,df:errorDF], pvalue:Pvalue), where
Pvalue is the two-tail P-value associated with the test statistic.

Example:
After regress("y=x1 + x2 + x3"),
  testestim(vector(2,3,4), 17) returns the t-statistic for testing H0:
     E(y|x) = 17
  testestim(vector(2,3,4), 17, pval:T, df:T) returns
     structure(tstat:t_statistic, df:ErrorDF, pval:p_value)

See also estimlimits(), predlimits(), regpred().


Gary Oehlert 2003-01-15