gen_mix_reg: generate 1d "v" distribution from x values

Description Usage Arguments Value

View source: R/data_Y.R

Description

Data is generated from y ~ p1 M1(x) + p2 M2(x) where (M1,M2)(x) ~ right_intercept + N(right_beta*x, right_sd) and (p1,p2) = right_proportions

Usage

1
2
3
4
5
6
7
gen_mix_reg(
  x,
  beta = c(-1, 1),
  intercept = c(0, 0),
  sd = c(1, 1),
  proportions = c(0.5, 0.5)
)

Arguments

x

x values

beta

vector length 2, see above

intercept

vector length 2, see above

sd

vector length 2, see above

proportions

vector length 2, see above

Value

data frame (x,y) sampled from the above distribution


benjaminleroy/simulationBands documentation built on Dec. 19, 2021, 8:41 a.m.