purge.probit: Purges mediator effects between two independent variables (probit link function)
Description
Purges mediator effects between two independent variables, where selection (direct) variable is binary, and returns new "purged" direct variable to be used in multivariate specification.
Usage
purge.probit(x, "direct", "indirect")
Arguments
x
Represents data frame, though usage requires the data.frame name
direct
Represents "direct", or mediator variable, though usage requires column's name
indirect
Represents "indirect", or mediated variable, though usage requires column's name
Value
purged
Details
Purging of mediator effects between two independent variables in two steps. First, the function regresses the direct (mediator) variable on the indirect (mediated) variable. Second, it stores and uses the residuals from the bivariate specification as the new "purged" variable to be used in place of the original "direct" variable in multivariate analyses. Regarding syntax, the function is built with placeholder objects to calculate the quantities of interest. Then, the usage allows placing the real objects' names from working datasets (including, data frame, direct variable name in quotes, and indirect variable name in quotes) for intuitive usage.