View source: R/linreg-homoscedasticity.R
goldfeld_quandt_test | R Documentation |
A wrapper around lmtest::gqtest()
that standardizes the inputs and outputs.
goldfeld_quandt_test(object, alternative = "two.sided", ..., .alpha = 0.05)
## S3 method for class 'lm'
goldfeld_quandt_test(object, alternative = "two.sided", ..., .alpha = 0.05)
## S3 method for class ''_lm''
goldfeld_quandt_test(object, alternative = "two.sided", ..., .alpha = 0.05)
## S3 method for class ''_glm''
goldfeld_quandt_test(object, alternative = "two.sided", ..., .alpha = 0.05)
object |
A model object (such as a fitted |
alternative |
Passed to the |
... |
Further arguments passed to |
.alpha |
(Optional) Critical p-value used to determine test conclusion. The default is 0.05 (5%). |
The hypotheses for this test are:
Null: Variances are Equal (Homoscedastic)
Alternative: Variances are Not Equal (Heteroscedastic)
A tibble with columns test
, statistic
,
p_value
, result
, outcome
, and .notes
with extra information.
Other homoscedasticity tests:
bruesch_pagan_test()
library(tidytest)
#> `lm` Method
mod_lm_fit <- lm(mpg ~ disp + wt + hp, data = mtcars)
goldfeld_quandt_test(mod_lm_fit)
#> `linear_reg` Method
library(parsnip)
mod_linreg_fit <- linear_reg() %>%
set_engine("lm") %>%
fit(mpg ~ disp + wt + hp, data = mtcars)
goldfeld_quandt_test(mod_linreg_fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.