Description Usage Arguments Value Examples
Compute analysis of variance (or deviance) tables for fitted model objects.'
1 | lm_anova(object)
|
object |
a result of lm_fit; only support cases when the input response variable is a vector or a n * 1 matrix and the method for fitting the model is "qr". |
lm_anova returns a list containing following response values.
Df |
degree of freedoms of SSR(the residual sum of squares) and SSE(sum of squared estimate of errors). |
'Sum Sq' |
SSR and SSE. |
'Mean Sq' |
MSR and MSE. |
'F value' |
the F statistics. |
'Pr(>F)' |
the p value of the f test. |
1 2 3 4 5 6 7 8 9 10 11 | n = 10; p = 5; q = 2;
x = matrix(rnorm(n * p), n, p) # no intercept
y1 = rnorm(n)
y2 = matrix(rnorm(n * q), n, q)
z1 = lm_fit(x = x, y = y1)
z2 = lm_fit(x = x, y = y2)
z_anova = lm_summary(z1)
# lm_anova function doesn't support cases lm_anova(z2)
# because the response value y2 is a matrix with more than 1 columns.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.