wildbootAddResids {BIGL}R Documentation

Sample residuals according to a new model

Description

Sample residuals according to a new model

Usage

wildbootAddResids(
  means,
  sampling_errors,
  method,
  rescaleResids,
  model,
  invTransFun,
  wild_bootstrap,
  wild_bootType,
  ...
)

Arguments

means

a vector of means

sampling_errors

Sampling vector to resample errors from. Used only if error is 4 and is passed as argument to generateData. If sampling_errors = NULL (default), mean residuals at off-axis points between observed and predicted response are taken.

method

What assumption should be used for the variance of on- and off-axis points. This argument can take one of the values from c("equal", "model", "unequal"). With the value "equal" as the default. "equal" assumes that both on- and off-axis points have the same variance, "unequal" estimates a different parameter for on- and off-axis points and "model" predicts variance based on the average effect of an off-axis point. If no transformations are used the "model" method is recommended. If transformations are used, only the "equal" method can be chosen.

rescaleResids

a boolean indicating whether to rescale residuals, or else normality of the residuals is assumed.

model

The mean-variance model

invTransFun

the inverse transformation function, back to the variance domain

wild_bootstrap

Whether special bootstrap to correct for heteroskedasticity should be used. If wild_bootstrap = TRUE, errors are generated from sampling_errors multiplied by a random variable following Rademacher distribution. Argument is used only if error = 4.

wild_bootType

Type of distribution to be used for wild bootstrap. If wild_bootstrap = TRUE, errors are generated from "rademacher", "gamma", "normal" or "two-point" distribution.

...

passed on to predictVar

Value

sampled residuals


[Package BIGL version 1.9.2 Index]