'Testing differences between conditions (in R)

I have a data frame "test" and several variables:

"eco" = 0, 1

"gender" = 0, 1

"age" in years

How could I test whether gender and age differ between the "eco = 0" and "eco = 1" conditions? I assume that Linear Probability model needs to be used.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source