View source: R/rackauskas_zuokas.R
rackauskas_zuokas | R Documentation |
This function implements the two methods of \insertCiteRackauskas07;textualskedastic for testing for heteroskedasticity in a linear regression model.
rackauskas_zuokas(
mainlm,
alpha = 0,
pvalmethod = c("data", "sim"),
R = 2^14,
m = 2^17,
sqZ = FALSE,
seed = 1234,
statonly = FALSE
)
mainlm |
Either an object of |
alpha |
A double such that |
pvalmethod |
A character, either |
R |
An integer representing the number of Monte Carlo replicates to
generate, if |
m |
An integer representing the number of standard normal variates to
use when generating the Brownian Bridge for each replicate, if
|
sqZ |
A logical. If |
seed |
An integer representing the seed to be used for pseudorandom
number generation when simulating values from the asymptotic null
distribution. This is to provide reproducibility of test results.
Ignored if |
statonly |
A logical. If |
Rackauskas and Zuokas propose a class of tests that entails
determining the largest weighted difference in variance of estimated
error. The asymptotic behaviour of their test statistic
T_{n,\alpha}
is studied using the empirical polygonal process
constructed from partial sums of the squared residuals. The test is
right-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)
rackauskas_zuokas(mtcars_lm)
rackauskas_zuokas(mtcars_lm, alpha = 7 / 16)
n <- length(mtcars_lm$residuals)
rackauskas_zuokas(mtcars_lm, pvalmethod = "sim", m = n, sqZ = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.