I have drawing data from 10 subjects drawing 8 shapes (and many repetitions of every shape). I fitted a model to this data Matlab, separately for each subject and each shapes, such that I have 2 model- parameters and an r^2 measure of the goodness of fit, in an 8x10 matrix (8 shapes, 10 subjects).

For each of these 3 variables I would like to know:

1. Does the parameter differ between shapes?

2. Do subjects differ in the parameter?

I think I need a linear mixed-model, where shapes are fixed and subjects are random, but I’m not sure (shapes are categorical, but this can still be modeled by linear models, right?).

I tried the following:

gamma.model = lmer(gamma ~ Shape + (1|Subject), data = gammatable, REML = FALSE)

summary(gamma.model) shows me a p-value for shape1 vs. every other shape, but not the relation between shape2 and shape 8 (for instance).

There is also no mentioning at all of random effects...?

1. If indeed I need a mixed-model (or if not – what do I need?)

2. How to define it correctly in lme4 (or other)

3. How to perform multiple comparisons and get p-values for fixed, as well as for random effects?

Thanks a lot!

3. You could use lsmeans to compare the fixed effects. The random effects (random intercept for Subject) is estimated as a standard deviation and variance in the output. You don't need a p-value for that.
Edit: To clarify, the model you should use depends, in part, on type of outcome/response variable you have. I mentioned continuous, though in reality there are different definitions of variable types, for example see here and here. For linear mixed models (such as lmer), one the main requirements is that the residuals are normally distributed. If the outcome variable is, for example a count, or an ordered categorical variable, it is highly likely that the residuals won't be normally distributed, and you should use a generalised linear mixed model instead.