We test whether x and y are conditionally associated, given S using a generalized linear model.

psi_hat_linear(y, x, S=c(), subset = NULL, out_bin = TRUE, exp_bin = FALSE)

Arguments

y

Outcome variable, either binary or numeric

x

Exposure variable, either binary or numeric

S

Conditional variable set, can be empty

subset

Optionally, control the subset of the dataset to be used

out_bin

A logical evaluating to TRUE or FALSE indicating whether outcome variable is binary.

exp_bin

A logical evaluating to TRUE or FALSE indicating whether exposure variable is binary.

Value

Test statistics and standard error of the test.

Details

This model is tested whether x and y is independent conditional on S. The final result is the test statistics and standard error.