Print a Regression Summary

DESCRIPTION:

Prints out a summary of a least squares regression (using lsfit) including the standard error of the residuals, the multiple R-squared coefficient, the overall F-statistic plus t-statistics and standard errors for each coefficient.

USAGE:

ls.print(ls.out, digits=4, print.it=T)

REQUIRED ARGUMENTS:

ls.out
a list like the output from lsfit.

OPTIONAL ARGUMENTS:

digits
the number of significant digits that should be printed.
print.it
logical flag: if TRUE, the regression summary is printed as well as returned.

VALUE:

an invisible list with the following components:
summary
a vector containing the residual standard error, the multiple R-squared coefficient, the number of observations, the overall F statistic for the regression, the degrees of freedom and the p-value for the F statistic.
coef.table
a matrix with columns containing the regression coefficients, their standard error, the t statistic for testing if the coefficient is zero and the two sided p-value for the t statistic.

SIDE EFFECTS:

If print.it=TRUE, a summary of the regression (like the returned value) is printed out.

SEE ALSO:

, , .

EXAMPLES:

freeny.ls <- lsfit(freeny.x, freeny.y)
ls.print(freeny.ls)  # look at the results
freeny.summary <- ls.print(freeny.ls, print.it=F)  # save them