Am I interpreting my lm() summary() results correctly in R? (this question I originally posted in stack overflow)
I want to know if I am interpreting the factor() function in R correctly. Suppose I have a variable with 10 levels let's say these are the different exposures of a study plan. I make it a factor using either factor() or as.factor(). When seeing the summary of my lm() (making up an example):
I know by default factor1 is treated as a reference in r so it is not usually output.
intercept: 10 factor2 = 30 factor3 = 10 factor4 = 57 factor5 = 4 factor6 = 34 factor7 = 56 factor8 = 89 factor9 = 78 factor10 = 8

Additionally, since these are 10 factors (all of the factors are dichotomous, 0 is did not get the study type, 1 is that they did and each participant can only have one study type) this would mean that in the example if someone got factor4 as their treatment/study type, that their score is multiplied by the coefficient which is in this case is 1 (which would equal 57) and added to the intercept? Just want to make sure I am interpreting this correctly.
my model formula using lm() is: test scre = intercept + factor2 + ... + factor10

Let's write out exactly what's going on when you say that a subject belongs to factor level $5$.
$x_i = (0, 0, 0, 1, 0, 0, 0, 0, 0)$ to denote belonging to level $\#5$, since level $\#1$ is subsumed by the intercept. Therefore, your regression equation gives you:
$$
\hat y_i = \hat\beta_0 + 0\hat\beta_1+0\hat\beta_2+0\hat\beta_3+1\hat\beta_4+
0\hat\beta_5+0\hat\beta_6+
0\hat\beta_7+0\hat\beta_8+0\hat\beta_9\\\implies\\\hat y_i = \hat\beta_0 + \hat\beta_4
$$
It looks like this is what your reasoning would give.
As a quick comment, we typically refer to one factor variable having multiple levels, so it would be more consistent with common terminology to refer to your variables as level2 and level3 (etc), rather than factor2 and factor3 (etc). Your terminology makes it sound like multiple factor variables, each of which can have different numbers of levels.
