Description Usage Arguments Value Examples

View source: R/modmed_make_formula.R

Create a formula based on lists of variables. All independent variables will be interacted with the moderator if the latter is specified. Controls are not.

1 2 |

`dependent` |
Character string. Dependent variable. |

`independent` |
Character vector. Independent variables. |

`moderator` |
Character vector. Moderating variable. |

`control` |
Character vector. Control variables. |

A formula to run in regressions. Interactions are introduced under the form "independent_x_moderator" and therefore the corresponding variable must be created in the dataset.

1 2 3 4 5 6 | ```
library(modelest)
model <- modmed_make_formula(dependent = "turnover",
independent = "justice",
moderator = "pay",
control = c("age","gender"))
model
``` |

NicolasJBM/model documentation built on Feb. 15, 2018, 11:12 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.