generate_response_with_ratio: Generate predictor coefficients according to the signal-noise...

Description Usage Arguments Details

View source: R/beta_coefficients.R

Description

Generate predictor coefficients according to the signal-noise ratio (SNR)

Usage

1
2

Arguments

X

matrix; data containing the covariates

family

family object; see "?family" for more details.

target_ratio

numeric vector; the desired signal-noise ratio

group

boolean; Should the data be grouped or ungrouped. See details.

f

function; transformation for the covariates.

...

extra parameters; see details.

Details

For families other than 'gaussian', the function reweights the samples such that the target signal-noise ratio is reached. This implies the data records will be treated as grouped records. If 'group' is TRUE, then the function returns the grouped data, otherwise, the function returns the ungrouped data (through duplication).

If 'family' is gaussian, one can pass the 'sd' argument through '...'. Otherwise, the function runs a stochastic search algorithm to search for the predictors coefficients, and one can pass the 'max_iter' argument (default to be 100) to '...'.

Other parameters are tol, curiosity and block_num. They are not recommended to external users.


kcf-jackson/glmSimData documentation built on May 20, 2019, 8:15 a.m.