I have a repeated measures data set and I would like to create a line graph of the mean values of test scores at each of seven timepoints for four groups:
I could manually calculate the mean() of each group:
but there has to be a programmatic way of doing this more elegantly.
- white males
- black males
- white females
- black females
I could manually calculate the mean() of each group:
Code:
mean(testscore) if(black==0) & (female==0) & (month==1) mean(testscore) if(black==0) & (female==0) & (month==2) mean(testscore) if(black==0) & (female==0) & (month==1) ... mean(testscore) if(black==1) & (female==1) & (month==7)
Comment