Learn R Programming

SLIC (version 0.3)

serr: Generate data with skewed errors

Description

Generate data with skewed errors

Usage

serr(n, nr, p, dist_type, ...)

Value

A list with X (design matrix), Y (response), and e (error)

Arguments

n

Number of total observations

nr

Number of observations with a different error distribution

p

Number of predictors

dist_type

Type of error distribution ("skew_normal", "skew_t", "skew_laplace")

...

Additional parameters for the error distribution

Examples

Run this code
set.seed(123)
data <- serr(1000, 200, 5, "skew_t")
str(data)

Run the code above in your browser using DataLab