uniform_sample_lcwm {outlierMBC}R Documentation

Sample a potential outlier.

Description

If outlier_type = "x_and_y", then both the covariate values and response error of the outlier proposed by this function will be Uniformly distributed. If outlier_type = "x_only", then the covariate values will be Uniformly distributed but the response error will be Normally distributed. If outlier_type = "y_only", then the response error will be Uniformly distributed but the covariate values will be Normally distributed.

Usage

uniform_sample_lcwm(
  outlier_type,
  mu_g,
  sigma_g,
  beta_g,
  error_sd_g,
  uniform_spans_g
)

Arguments

outlier_type

Character string governing whether the outliers are outlying with respect to the explanatory variable only ("x_only"), the response variable only ("y_only"), or both ("x_and_y"). "x_and_y" is the default value.

mu_g

Covariate mean vector for component g.

sigma_g

Covariate covariance matrix for component g.

beta_g

Regression coefficient vector for component g.

error_sd_g

Regression error standard deviation for component g.

uniform_spans_g

Covariate and response error ranges for component g.

Value

uniform_sample_lcwm returns a list with the following elements:

x

Vector of covariate values.

y

Response value.


[Package outlierMBC version 0.0.1 Index]