yuce | R Documentation |
This function implements the two methods of \insertCiteYuce08;textualskedastic for testing for heteroskedasticity in a linear regression model.
yuce(mainlm, method = c("A", "B"), statonly = FALSE)
mainlm |
Either an object of |
method |
A character indicating which of the two tests presented in
\insertCiteYuce08;textualskedastic should be implemented. Possible
values are |
statonly |
A logical. If |
These two tests are straightforward to implement; in both cases the
test statistic is a function only of the residuals of the linear
regression model. The first test statistic has an asymptotic chi-squared
distribution and the second has an asymptotic t
-distribution. In
both cases the degrees of freedom are n-p
. The chi-squared test
is right-tailed whereas the t
-test is two-tailed.
An object of class
"htest"
. If object is
not assigned, its attributes are displayed in the console as a
tibble
using tidy
.
mtcars_lm <- lm(mpg ~ wt + qsec + am, data = mtcars)
yuce(mtcars_lm, method = "A")
yuce(mtcars_lm, method = "B")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.