\begin{Schunk}
\begin{Sinput}
 dat$gender2 <- factor(dat$gender, levels = c("female", "male"))
 reg.mod.2c <- lm(posAffect ~ gender2, data = dat)
 summary(reg.mod.2c)
\end{Sinput}
\begin{Soutput}
Call:
lm(formula = posAffect ~ gender2, data = dat)

Residuals:
     Min       1Q   Median       3Q      Max 
-2.10992 -0.35609 -0.01197  0.47724  0.97724 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  3.10992    0.04638  67.047   <2e-16 ***
gender2male -0.08717    0.06475  -1.346    0.179    
---
Signif. codes:  
0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.6309 on 378 degrees of freedom
Multiple R-squared:  0.004772,	Adjusted R-squared:  0.002139 
F-statistic: 1.812 on 1 and 378 DF,  p-value: 0.179
\end{Soutput}
\end{Schunk}
