R/psi_hat.R
psi_hat_linear_int.RdWe test whether x and y are conditionally associated, given
S using a generalized linear model allowing interaction between variables in S.
psi_hat_linear_int(y, x, S=c(), subset = NULL, out_bin = TRUE, exp_bin = FALSE,
two_way=FALSE, three_way=FALSE)Outcome variable, either binary or numeric
Exposure variable, either binary or numeric
Conditional variable set, can be empty
Optionally, control the subset of the dataset to be used
A logical evaluating to TRUE or FALSE indicating whether outcome variable is binary.
A logical evaluating to TRUE or FALSE indicating whether exposure variable is binary.
A logical evaluating to TRUE or FALSE indicating whether two-way interaction for S is included in regression model.
A logical evaluating to TRUE or FALSE indicating whether three-way interaction for S is included in regression model.
Test statistics and standard error of the test.
This model is tested whether x and y is independent conditional on
S. The final result is the test statistics and standard error.