Fitting a model in R, Least squares estimates

107 Views Asked by At

$ \Bbb E$(grades) = $\bigg(\alpha$, teacher='Female',

and,

$\bigg( \alpha+\beta $, teacher='Male'

given that I have loaded up the required data, how should I go about fitting this model in R? Then I need to find the least squared estimates of both $\alpha$ and $\beta$ which I think I will be able to do once I can fit the model. Thanks!

1

There are 1 best solutions below

2
On

For discrete variables like Male vs. Female, the best you can do is average the population. So $\alpha=$ average grade from a Female teacher, $\beta=$average grade from a Male teacher minus $\alpha$