dgp: Generates data from a linear model

Description Usage Arguments

View source: R/dgp.R

Description

Generates n_obs observations where the outcome (y) is the weighted sum, with weights given by beta_coefs, of a number of independent uniform(-1, 1) distributed random variables.

Usage

1
dgp(n_obs, beta_coefs, true_mean = FALSE)

Arguments

n_obs

Number of observations

beta_coefs

Vector of beta coefficients. The length of the vector will determine the number of covariates

trueMean

If TRUE, returns response/outcome without noise. Defaults to false


ooelrich/dgpsim documentation built on Sept. 22, 2020, 9:27 a.m.