# Whether there is significant difference between two gender groups

A data set contains 5 columns:

There are 16 people in the dataset(using subjectID to identify them). Each year, when these people were ages 11, 12, 13, 14, and 15, they provided us a score $$y$$. We now want to know whether there is a significant difference between male and female people (in their average $$y$$ score). How could I do? I found that this dataset does not meet the normality assumption. And in "Male" group, say subject 45 will appear 5 times, subject 268 will appear 5 times as well... Could I just use the mean of this "Male" group to make comparison with the mean of "Female" group?

And I also wonder if I can use a fixed effect model to compare these two groups:

We can see the difference between "Male" group and "Female" group is 0.13521, and it is not significant at 5% level as its p-value=0.228 (cannot reject $$H_0$$:"genderM"=0). So could I just say the difference is not significant?

• Sampling the same subjects each year is a form of pseudo-replication, so your sample size is not as large as you think it is. You should only count each subject once – gardenhead Mar 26 '19 at 21:16

$$y_{it} = \beta_{0t}+\beta_{1i}X^{age}_{it}+\epsilon_{it}\\ \beta_{0i}=\gamma_{00}+\gamma_{01}X^{gender}_{i}+u_{0i}\\ \beta_{1i}=\gamma_{10}+\gamma_{11}X^{gender}_{i}+u_{1i}$$ where $$i$$ indexes unit-ID and $$t$$ indexes measurement occasion for individual $$i$$. The third line can be replaced by $$\beta_{1i}=\gamma_{10}+u_{1i}$$ if you don't think the effect of age depends on gender but varies for each individual or $$\beta_{1i}=\gamma_{10}$$ if you think the effect of age is constant for all individuals.
To use cluster-robust standard errors, simply run the model $$y_j=\beta_0+\beta_1X^{age}_{j}+\beta_2X^{gender}_{j}+\beta_3X^{age}_{j}X^{gender}_{j}+\epsilon_j$$ where $$j$$ indexes each row in the data set, and then request a cluster-robust standard error with unit-ID as the clustering variable. If age is centered, $$\beta_2$$ will be the effect of gender on the outcome.