@key factors
you can add one or more "factors" to a @key object in order to quickly set up and run n-way ANOVAs.
Each factor has a label, and is composed of 2 or more levels; each level has a label and includes one or more of the keys in the object.
Suppose you have the @cortex object c
and the @key object k
with 6 keys whose labels are:
RedVertical RedHorizontal BlueVertical BlueHorizontal GreenVertical GreenHorizontal
you could create 2 factors, one for the stimulus's color, one for its orientation. To add a factor to a @key object use the function addfactor()
as in the following example:
llab = {'red' 'blue' 'green'}; lkey = {1:2 3:4 5:6}; fk = addfactor (k, 'color', llab, lkey); llab = {'vertical' 'horizontal'}; lkey = {[1 3 5] [2 4 6]}; k = addfactor (k, 'orientation', llab, lkey);
Now you can analyze color and orientation selectivity with a 2-way ANOVA, using the following:
[p s t x] = anovan (c, 1, k, [1 2])