[ top | up ]

Compute diagnostics for lsfit regression results

Syntax

ls.diag(ls.out)

Arguments

ls.out Typically the result of lsfit(..)

Description

Computes basic statistics, including standard errors, t- and P- values for the regression coefficients and prints them if print.it is TRUE.

Values

A list with the following numeric components.
std.dev The standard deviation of the errors, an estimate of greek(sigma). hat diagonal entries {{h}_{ii}_} of the hat matrix H std.res standardized residuals stud.res studentized residuals cooks Cook's distances dfits DFITS statistics correlation correlation matrix std.err standard errors of the regression coefficients cov.scaled Scaled covariance matrix of the coefficients cov.unscaled Unscaled covariance matrix of the coefficients

References

Belsley, Kuh and Welsch.

See Also

hat for the hat matrix diagonals, ls.print, lm.influence, summary.lm, anova.

Examples

lsD9 <- lsfit(x = as.numeric(gl(2,10,20)), y = weight) dlsD9 <- ls.diag(lsD9) plot(dlsD9 $ hat, dlsD9 $ stud.res); abline(h=0, lty=2, col='lightgray')