I wanted to make sense of the R syntax. But it has exhausted my patience. Honestly, if R programmers expect people to even care about reviewers examining the syntax given by the researchers, they should make R simple to understand (e.g., the use of multiple [] and {} and () is exceedingly exhausting for my little brain). Now, unless a reviewer is a statistician and a programmer, and is willing to spare some time, he will look at it. But that's beyond my expertise. I understand R, but only the simple codes.

However, I understand the description of the models you use. Still, I don't get several things. You say :

Quote:Then, for each year, we calculated the composite population using the population data and their IQs (using the same data as in Section 3). The plot of the results is shown in Figure 6.

But in Figure 6, the legend reads :

Quote:Figure 6: Change in mean IQ and SD over time in Denmark modeled from population data by country of origin and national IQs.

Why am I thinking it's odd here ? Given the above paragraph, you use the actual data, and calculate the means/SD per year, so it's the observed data. In the legend of Figure 6, it is said "modeled" as if you have used some statistical modeling while you have only made a descriptive analysis. Correlation and Cohen's d for example are this kind of descriptive analysis. At the beginning of section 4, you say that the model presented in figure 6 did not assume g gains for immigrants. As I said, it's odd because in the description, you merely said you have calculated the means and SD over time. Do you mean "no g gain model" because your descriptive analysis does not incorporate IQ gain for immigrants ? I ask this question based on what I understand (not much) of your syntax below :

Code:

`# IQ vector - no gains`

IQ.vector = unlist((DF["IQ"]-100)/15) #standardized IQs

names(IQ.vector) = rownames(DF) #set names again

#IQ.vector = c(-2,2) #for testing purposes

#IQ vectors for gains

for (case in 1:length(IQ.vector)){ #loop over each IQ

if (IQ.vector[case] < -0.18666667){ #is it lower than DK?

diff.to.DK = (-0.18666667-IQ.vector[case])

IQ.vector[case] = IQ.vector[case]+diff.to.DK*.75 #change this value for the other scenarios

}

}

And, more important. When one wants to examine what model has the better "fit" to the data (I use fit in parentheses because there is no fit indices) you need to compare the differing models (presented in table 2) with what is observed in the actual data. Why I'm perplexed is that in section 5, you have plotted the scenario of no g gain. Section 6, you have listed in the table 2, the expected outcomes for the different scenarios. Section 7, you talk about the military danish data, but I don't see the link between section 7 and sections 5-6. In section 7, you only mentioned that the SD of the immigrants is higher than the natives. I don't see how it helps to evaluate whether the model of "no g gain" is better than the others.

One other question here :

Quote:The cause of the larger than expected SD is perplexing. The fact that some non-Danes are classified as 'Danish origin' means that the SD should be smaller than modeled, not larger.

Why smaller ? I'm not sure I get the idea. Also when you say "larger than expected SD" you also said that your model predicts 11.3% SD higher, but that the actual data shows 14.2% higher. But these values are still close, no ? Also, what do you mean by "

Using the model to predict this value using 2003 data, gives 11.3% which is not too far off (estimated SD's 15.01 for 'western' and 16.70 for 'non-western')." ? Which model exactly ?