wqs: Wrapper function for gWQS. All parameters are passed directly...

View source: R/dimension_reduction.R

wqsR Documentation

Wrapper function for gWQS. All parameters are passed directly to the gwqs function of the gWQS package. The parameters listed below are the ones commonly used when we do WQS. However, you can supply any parameters you wish from the gWQS documentation. See https://cran.r-project.org/web/packages/gWQS/gWQS.pdf

Description

Wrapper function for gWQS. All parameters are passed directly to the gwqs function of the gWQS package. The parameters listed below are the ones commonly used when we do WQS. However, you can supply any parameters you wish from the gWQS documentation. See https://cran.r-project.org/web/packages/gWQS/gWQS.pdf

Usage

wqs(...)

Arguments

formula

(formula) y-col ~ wqs

data

(data.frame) data

mix_name

(vector<character>) column names for the mixture components

valid_var

(character) column name for the validation variable

b

(number) number of bootstrap samples to use in parameter estimation

b1_pos

(bool) whether weights are derived from models where the beta values were positive or negative

b1_constr

(bool) whether to apply positive (if b1_pos = TRUE) or negative (if b1_pos = FALSE) constraints in the optimization function for the weight estimation

q

(number) An integer to specify how mixture variables will be ranked, e.g. in quartiles (q = 4), deciles (q = 10), or percentiles (q = 100). If q = NULL then the values of the mixture variables are taken (these must be standardized)

family

(character) family of the model, e.g. "gaussian", "binomial"

seed

(number) seed for the random number generator

Value

(results) Results object from gWQS. See gWQS documentation for details and ways to interact with these results.

Examples

wqs(CASE_CNTL ~ wqs, mix_name = pollutants, data = df, valid_var='validation', 
     q = 10, validation = 0.3, b = 2, b1_pos = TRUE, b1_constr = FALSE, 
     family = "binomial", seed = 42)

paulsavala/nebcs documentation built on March 20, 2022, 9:24 a.m.