Next: entervar() Up: Regression Macros Help File Previous: anovapred()   Contents

betalimits()

Usage:
 ```betalimits(Term, level), Term a CHARACTER scalar, a positive integer or a variable in the most recent regression model, REAL positive scalar level < 1. ```

Keywords: regression, confidence limits
```You use betalimits() to compute confidence limits for a regression
coefficient.  Its use must be preceded by a GLM command, usually
regress() or anova().

betalimits(Term, Level), where Term specifies a variable or a term in
the ANOVA table, and Level is a REAL scalar between 0.5 and 1, returns
upper and lower confidence limits for a regression coefficeint or ANOVA
main effects or interactions.

Term can be a quoted or unquoted predictor variable or term name, or
CONSTANT or a positive integer specifying the number of the term.  If
the term is an iteraction it must be quoted.

Level is the desired confidence coefficient.  If level < .5, a warning
message is given and the confidence coefficient is assumed to be 1 -
level.

After regress(), the result is vector(lower, upper), where lower and
upper are the confidence limits.

After anova(), when the term is a main effect with k levels, the result
is k by 2 matrix hconcat(lower, upper).  When the term is an
interaction of factors with k1, k2, ... levels, the result is
array(vector(upper,lower),k1,k2,...,2).

Example:
After regress("y=x1 + x2 + x3"), the following are all equivalent
Cmd> betalimits(x2, .95)
Cmd> betalimits("x2",.95)
Cmd> betalimits(3,.95)  #counting the constant, x2 is the third term

They all return a vector of length 2.

If a and b are factors with 3 and 4 levels, respectively, after
anova("y = a*b") (equivalent to anova("y = a + b + a.b"))
Cmd> betalimits("a.b",.95) # quotes are required
and
Cmd> betalimits(4, .95) # a.b is term 4
are equivalent and return a 3 by 4 by 2 array with a[i,j,] the upper
and lower limits for the i,j interaction effect.

In all these replacing .95 by .05 gives the same result except a
warning message is printed.