I want to use the excellent tool PALM to investigate whole-brain voxel-wise Pearson correlations. As an example use case, I have VBM data for a bunch of participants and want to correlate the gray matter volume of each voxel with IQ. I also have age of each participant which I would like to be taken into account as a covariate.

Question: how should the contrast file look like?
Considering the two variables, IQ and age, are entered in the design matrix, does the following contrast along with the -pearson flag give me what I want?

Extrapolating from the GLM specifications from the CONN toolbox (CONN toolbox - General Linear Model) I believe your design matrix should be [0 1 0] corresponding to [allSubjects IQ age]. allSubjects would just be a vector of 1s, and IQ and age are vectors of each subjects IQ and age. I do not know what /NumWaves and /NumPoints are in this context.

As PALM allows -pearson which is supposed to calculate the Pearson correlation, I suspect having a column with all 1s is redundant in this case. And exactly for the same reason I am not sure of the -pearson flag takes additional covariates into account as Pearson correlation is defined only for two variables. Of course one can calculate the betas while taking additional covariates into account and then convert them or a r value but the PALM documentation does not explicitly mention what it does.