My version of Stata disagrees with what you say about numbering
schemes. Here is data and the same test repeated twice with different
numbering schemes for the subsamples, and code used to generate the
data can results. Note the different results.
drop _all
set obs 150
*only difference in next line
egen neuron = seq(), from(1) to(3) block(1)
egen subject = seq(), from(1) to(10) block(15)
egen treatment = seq(), from(1) to(5) block(3)
gen a = invnorm(uniform()) in 1/10
gen a_effect = a[subject]
drop a
gen c_effect = invnorm(uniform())
gen error = invnorm(uniform())
gen measure = a_effect + c_effect + error
* correct RMA model nesting neuron in subject
anova measure subject / neuron|subject treatment / treatment*subject
/, repeated(treatment)
test treatment / treatment*subject
drop _all
set obs 150
egen neuron = seq(), from(1) to(150) block(1)
egen subject = seq(), from(1) to(10) block(15)
egen treatment = seq(), from(1) to(5) block(3)
gen a = invnorm(uniform()) in 1/10
gen a_effect = a[subject]
drop a
gen c_effect = invnorm(uniform())
gen error = invnorm(uniform())
gen measure = a_effect + c_effect + error
* correct RMA model nesting neuron in subject
anova measure subject / neuron|subject treatment / treatment*subject
/, repeated(treatment)
test treatment / treatment*subject